3.4 event system holding objects?

Robert Withers rwithers12 at attbi.com
Sat Feb 8 15:42:38 UTC 2003


Bill,

What changeset version have you loaded from the update stream?   There 
was a patch released in the update stream which fixes an issue in 
WeakActionSequence.

the 3.4 event system uses WeakMessageSends and WeakActionSequences to 
hold both receivers and arguments.  This will not be the source of your 
morph preservation.  :)

The source of unreleased garbage, that I run into consistently, is 
reified DoIt contexts that are holding a morph as the receiver.  If you 
clear out the receiver, then that will allow them to be GCed.    I have 
the most success walking the 'objects pointing to this value' from an 
inspector, but this is the most tedious way to go about it.

this should give you the count of the number of Morphs involved in 
registrations.
	Morph allSubInstances select: [:e | (e valueOfProperty: #actionMap) 
notNil].

If I am looking at the code correctly, Worlds' actionMap properties 
should be holding weak references to just WonderlandCameraMorphs.

cheers,
rob

On Saturday, February 8, 2003, at 05:26 AM, Bob Arning wrote:

> Bill,
>
> If events are responsible for keeping garbage around, then there are 
> likely two reasons:
>
> 1. That events are implemented with strong references that need to be 
> explicitly released, but are not.
> 2. The events are written in such a way as to carry extra baggage that 
> might otherwise have been collected.
>
> To see which of these might be behind the bloat you are seeing, it 
> might help if you posted the result of one of your PointerFinder 
> searches.
>
> Cheers,
> Bob
>
> On Sat, 8 Feb 2003 02:33:45 -0500 "Bill Schwab" <schwabw at sprynet.com> 
> wrote:
>> I did a little more digging into that bloated image I mentioned a few
>> days ago.  First, I verified that I didn't have a large number of
>> lingering Process-es holding things in the image.  Then I did some
>> checking with the PointerFinder and it kept leading to events
>> associated with Wonderland actors (the objects that are most
>> notably lingering in the image).
>>
>> Some browsing in 3.4 (the problematic image) and my slightly
>> older 3.2 image reveals that my 3.4 image includes
>> Object>>when:evalaute, and that #when:send:to: and friends are
>> written in terms of it instead of #when:perform: as in 3.2.  I find 
>> this
>> suspicious because #when:evaluate: was removed from Dolphin
>> quite some time ago, specificially because it was causing
>> problems with large networks of objects that were immune to the
>> gc.
>>
>> Comments?
>
>



More information about the Squeak-dev mailing list