[Pyrex] NoneType object is not callable in dealloc

Lenard Lindstrom len-l at telus.net
Sun Oct 2 01:33:48 CEST 2005


On 30 Sep 2005 at 16:52, AKX wrote:

> > Making debug an attribute keeps it alive until the AlFont instance deallocated.
> 
> That is a solution (works, thank you), but not a good solution since
> other classes built similarly work without problems...

That depends on the order object instances were freed and not the classes 
themselves.
 
> Is there a way to make an object (debug) persistent so I would have to
> clean it myself, or should I maybe just clean up any debug() calls
> from destructors since they may cause unstable behavior and I don't
> want to have to have debug as a property of each object?
> 
I do not know how to control when a global variable is deleted at program 
termination. As for self.debug Pyrex takes care of deleting it for you in the 
destructor. But debug will remain alive if not every instance of AlFont is deleted.

Lenard Lindstrom
<len-l at telus.net>




More information about the Pyrex mailing list