3.4 event system holding objects?
Bill Schwab
schwabw at sprynet.com
Sat Feb 8 19:14:27 UTC 2003
John,
==========================
Well, let's not forget that the system was designed for dependents
to release their dependencies. If one declares *any* kind of
dependency, one should explicitly release that dependency when
the object is no longer being observed. This is as true for
#when:send:to: as it is for #changed:/#update:.
==========================
With respect, I hope you are wrong. Please don't take offense at
my contrasting your reply with Ned's (below) - I just want to get to
the truth.
Ned,
==========================
The 3.4 image includes a number of changesets that attempt to
make the event system use weak references for registration.
==========================
Well, a properly updated 3.4 image does :) Thinking back, I realize
that I got into the mess because of the RB integration. I was doing
some work on my MIDI project, and wanted the RB's help to push
methods and variables up and down as appropriate. The original
plan was to file out a change set if things got ugly. Then all kinds
of things started appearing on SqueakMap, and I forgot that I was
living on the edge.
==========================
I don't know what Dolphin has to do with this problem in Squeak,
though.
==========================
Nothing directly. Maybe you just had to be there :)
==========================
It's our intention to make this event system as clean and leak-free
as possible.
==========================
Great!
==========================
Could you poke around some more to see what's not getting GC'd?
It could be that the actors are responsible for hanging onto the
events, and something else is holding on to the actors.
==========================
It looks like I picked a bad place to stop updating. Past that,
evaluating
#(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
Wilhelm K. Schwab, Ph.D.
bills at anest4.anest.ufl.edu
(352) 846-1285
More information about the Squeak-dev
mailing list
|