[PEAK] memory leaks & stuff
Phillip J. Eby
pje at telecommunity.com
Wed Sep 15 15:22:18 EDT 2004
At 10:08 PM 9/15/04 +0300, alexander smishlajev wrote:
>Yaroslav Samchuk wrote, at 14.09.2004 20:52:
>
>>On the last week we had discovered, that the application, which is
>>developed by our team was leaking memory.
>
>that's it. the memory is leaking with nested AnyOf()s when the inner one
>does not include a _Sleeper. the following script leaks memory with i/o
>events and Observable (or any derivatives), unless the the inner AnyOf
>includes eventLoop.sleep()
AnyOf releases its references to other events once it has fired, so the
problem is that the various nested AnyOf's with events that don't fire, are
not getting garbage collected.
It seems the natural fix for this would be to make AnyOf automatically
"flatten" any nested AnyOf's into itself, so that there is never such a
thing as a nested AnyOf. I'll try to implement this along with the other
changes I've mentioned for events. (i.e., retaining socket and signal
events whenever they callbacks active, rather than using weak references
exclusively.)
More information about the PEAK
mailing list