3.4 event system holding objects?

Bill Schwab schwabw at sprynet.com
Sat Feb 8 19:14:11 UTC 2003


Rob,

===============================
What changeset version have you loaded from the update stream? 
===============================

I suspect that is the problem.  The image was at 5138.


===============================
 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.  :)
===============================

I just updated it to 5169 and now have the classes you mentioned.



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

I suspect that will be the case for new objects, now that I've 
updated.  However, #aboutToLeaveWorld holds an ActionSequence 
that in turn holds, among 27 others:

MessageSend(#suspendAcceleration -> a 
WonderlandCameraMorph<camera>(3501))

I suspect the updates will correct the problem for new objects, but I 
still have a lot of damage that seems unlikely to go away without 
some slicing.

As you suggested, I inspected

Morph allSubInstances select: [:e | 
	(e valueOfProperty: #actionMap) notNil
].

and it turned up only the World.

( World valueOfProperty: #actionMap ) gives me an 
IdentityDictionary with two keys: #aboutToEnterWorld and 
#aboutToLeaveWorld.  Stored under them are two ActionSequence-
s (not weak) and they in turn contain MessageSend-s (not weak).  
All actions were created by/for Alice.

Removing the keys and waiting for a few (or more???) gc cycles 
took 5MB off of my image file.  There is still one more camera 
(perhaps) tied up in a StepMessage, and I'm not yet sure what to 
do about it.

Thanks,

Bill

Wilhelm K. Schwab, Ph.D.
bills at anest4.anest.ufl.edu
(352) 846-1285



More information about the Squeak-dev mailing list