On Sunday, January 9, 2011 12:59:47 AM UTC-5, ron_m wrote: 
>
> To get the leak the __del__method has to be in the class. The gc.collect() 
> as suggested by Massimo cured the leak for the exec code case I believe 
> because gc.collect() runs a test on the objects to see if there are any 
> external references, finds none, and therefore allows them to be removed 
> from the heap.

 
Sorry if I'm being dense, but to be clear, the leak can happen with exec 
even if the class does not have a __del__ method (i.e., web2py's case), and 
that kind of leak can be prevented using gc.collect (the recent fix put into 
place). However, if the class has a __del__ method, you get a leak even if 
exec is not being used, and that kind of leak is not resolved by gc.collect. 
Is that right? 

Reply via email to