I have recently been looking into the problem of disapearing member variables on GObject wrappers:
http://bugzilla.gnome.org/show_bug.cgi?id=92955


I have a fairly good idea of why this happens: the cycle GC system thinks that the only references held on the wrapper are part of cycles, as it doesn't know about the hack in pygtk to resurrect the wrapper, so asks the instance dictionary to clear itself.

I believe the way to solve this problem is to get rid of the hacks in pygtk :) I outline my proposed solution in the comment on the bug dated 2003-03-05 06:16.

I also have an initial patch to implement this solution. Unfortunately, things aren't quite working correctly. The garbage collector never seems to call the GObject wrapper's tp_clear() method, so the wrapper (and GObject end up getting leaked).

If anyone on the list has experience with the Python cycle GC, I would appreciate it if you could read over my reasoning, and hopefully spot any obvious mistakes. If I can get this working, I would like to apply it for the next pygtk release.

Thanks,

James.

--
Email: [EMAIL PROTECTED]
WWW:   http://www.daa.com.au/~james/



_______________________________________________
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to