[Seaside] cleaning up in 2.5

radoslav hodnicak rh at 4096.sk
Wed Sep 8 11:07:17 CEST 2004


On Tue, 7 Sep 2004, Jon Paynter wrote:

> I have the same problem in my own images..  WASession and WAApplication
> objects dont want to get garbage collected, resulting in my VW images
> exceeding 50mb when they should be around 17.
>
> I saw a revelant post in the archives about this, checked my image and
> the fix appeared to be in place... yet session and application objects
> wont go away.

Set shared var Halos in WAHalo to nil. do "WARegistry clearAllHandlers".
Garbage collect. If your sessions are still there you may have an
inspector or debugger open or something, try to trace back the references.

> Rado - you mentioned you were expiring your sessions.. was that from a
> workspace? or as a normal part of operations in your code? So far ive
> relied on normal garbage collection procedures to keep stuff cleaned up
> & want to make sure im not leaving out some importand steps somewhere.
> Im not using any database connections, but it would be nice to know
> where to stick calls to my own save methods.

Yeah from workspace, just looping over allInstances of my session and
sending it expire. The most reliable way if found (that was seaside 2.3,
perhaps 2.5 has some new hooks but I'm still using the old code) is to
override #isActive in your session and call #expire from there if "super
isActive" returns false. Then override #expire to do clean-up

rado



More information about the Seaside mailing list