[BUG]Morph>>updateableActionMap

Ned Konz ned at bike-nomad.com
Tue Mar 19 00:20:52 UTC 2002


On Monday 18 March 2002 04:07 pm, Bob Arning wrote:

> >I ran into the same problem with BlockClosures, and so went to
> > MessageSends, but had to use separate WeakArrays to hold onto the
> > arguments. However, making a weak MessageSend would be quite easy.
>
> That could be a bit tricky. If the arguments were held weakly, then they
> might disappear while the MessageSend itself was still needed.

Sure, but (at least in my case) I was running into situations where the 
references from the BlockContexts or MessageSends were the only things 
keeping certain Morphs from being GC'd after they'd been deleted.

Ultimately, something has to hold onto the objects you're using, but you may 
not want it to be a MessageSend.

I just think that in some cases it is handy to have a WeakMessageSend, though 
I wouldn't want it for everything.

You would have to be careful to check for the arguments before (and 
strengthen them temporarily during) the #value call.

I'd probably have a separate exception that would be raised if you tried to 
evaluate a WeakMessageSend if its argument(s) had gone away.

-- 
Ned Konz
currently: Stanwood, WA
email:     ned at bike-nomad.com
homepage:  http://bike-nomad.com



More information about the Squeak-dev mailing list