[Python-ideas] I found to detect if an object is GCed is very hard within python.

Oleg Broytman phd at phdru.name
Sun Apr 8 12:57:29 CEST 2012


   We are sorry but we cannot help you. This mailing list is to discuss
new Python ideas; if you're having problems learning, understanding or
using Python, please find another forum. Probably
python-list/comp.lang.python mailing list/news group is the best place;
there are Python developers who participate in it; you may get a faster,
and probably more complete, answer there. See
http://www.python.org/community/ for other lists/news groups/fora. Thank
you for understanding.

On Sun, Apr 08, 2012 at 03:39:56PM +0800, "?????????(Yonggang Luo) " <luoyonggang at gmail.com> wrote:
> For example, I write an C extension with two object Parent and Child,
> they referenced each other as member, so circular referenced, how to
> use Python unittest to detect that?

   I think, a weak reference with a callback can help.

     Oleg Broytman            http://phdru.name/            phd at phdru.name
           Programmers don't die, they just GOSUB without RETURN.

More information about the Python-ideas mailing list