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.

Reply via email to