[Pyrex] __del__ not called on some objects
Bob Ippolito
bob at redivi.com
Fri Aug 26 05:37:10 CEST 2005
On Aug 25, 2005, at 7:57 PM, John (J5) Palmieri wrote:
> I just found a bug during my attempts to debug some memory leaks in
> the
> dbus bindings. We use __del__ to unref some C objects when the
> wrapper
> Pyrex object goes out of scope. The problem was our Message object
> was
> not calling __del__ and causing a huge memory leak. On further
> inspection I noticed that other Message objects were. The difference
> was the one calling __del__ were all subclasses of Message.
> Subclassing
> Message solved the problem though it seems dubious why this would
> be the
> case. It might have something to do with the fact that Message
> exports
> cdef methods while the derived classes only export the __init__
> constructor.
>
> If you need any more information let me know.
A simple reproducible example that demonstrates the problem would
sure help.
-bob
More information about the Pyrex
mailing list