3.4 event system holding objects?

Robert Withers rwithers12 at attbi.com
Mon Feb 10 00:36:55 UTC 2003

On Saturday, February 8, 2003, at 02:47 PM, Bob Arning wrote:

> On Sat, 8 Feb 2003 14:14:27 -0500 "Bill Schwab" <schwabw at sprynet.com> 
> wrote:
>> #(aboutToLeaveWorld aboutToEnterWorld) do:[ :each |
>> 	( World valueOfProperty: #actionMap ) removeKey:each.
>> ].
>> and waiting a while for some gc activity took about 5MB off of my
>> image.  That's getting down to a believable size, though still
>> noticeably bigger than an older 3.2 image that's lurking on this
>> machine; the difference could be the RB and other new goodies.
>> There is also at least one more Alice related straggler, and it might
>> interest you.  Is StepMessage something that should be
>> weakened?
> Bill,
> Maybe, maybe not. It might be plausible for an object to expect 
> notification from an event even if that event is the only reference to 
> the object. Might be nice to have an option for strong or weak 
> MessagesSends.

I agree, but not by default.  By default, it shouldn't be the source of 
uncollected garbage, and would require you to hold onto things involved 
in an event activation.   This is a rather strongly held opinion of 
mine, unfortunately.

Ned and I did discuss at great length the necessity of having the 
capability to strongly hold references.  In fact, his Connectors 
package overrides the default behavior and does hold them strongly.

IIRC, we discussed some extension event registration protocol that 
would allow you to specify 'use strong references' (what should the 
keyword message be?).  The really desirable mechanism would be to 
specify the reference strength for the receiver and each argument (as 
well as whether the registration argument or the trigger argument would 
be selected).  This mechanism would be something equivalent to a mask 
of bits, or another extension to the #when:send:to:withArguments: that 
would provide for this user control over the event mechanism.

> To your specific problem: WonderlandCameraMorph does register interest 
> in some events, but it also has code to de-register that interest. The 
> question is why that code is not getting called, so if you can 
> remember or invent a simple sequence that recreates this problem, we 
> may be able to fix it.

Perhaps he never left that world?


More information about the Squeak-dev mailing list