Image not release the memory in a Seaside session

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Image not release the memory in a Seaside session

Andrés Garagiola
Hi list,

I have a problem with a Seaside session memory consumption. In my system there are a seaside session that should run for a long time (many days or months), this session is running a page that have JQuery code. This JQuery reload certain parts of the website by 5 seconds intervals.

While time is progress then the vm memory is increase and it never release this memory. In two days the memory increase of 40 MB to 530 MB. I investigate the problem and found that the callbacks are adding in this code:

store: aCallback
    | key |
    key := self advanceKey.
    callbacks
        at: (aCallback convertKey: key)
        put: aCallback.
    aCallback
        setKey: key
        callbacks: callbacks.
    ^ key

But the old callbacks never are clear, then the GC never collect this objects. After a time the image have thousands callbacks that never will be collect.

Anyone knows what can by the solution?

Thanks you very much.
Regards
Andres


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: Image not release the memory in a Seaside session

mozillanerd
I have suggested in Gmane list that the reason could be closures. Closures may leave references that are never returned. Each time you have a callback, the closure must remain avaiable.
I would like to know why you return key?