On 20 Jul, 13:04, Adam Tauno Williams <awill...@whitemice.org> wrote:
> > 3. Instances of extension types can clean themselves up on > > deallocation. No parent-child ownership model to mess things up. No > > manual clean-up. Python does all the reference counting we need. > > NEVER GOING TO HAPPEN. UI's don't work that way. They are inherently > hierarchical. Just get over it. Swing relies on the Java GC. Tkinter also does this correct. A hierarchy is nice for event processing an layout management, but not for memory mangement. C resources should be freed by Python calling tp_dealloc, not by the parent calling a .destroy() method on it's children. Python is not C++, so we have a method to automatically reclaim C resources. I don't want a toolkit to deallocate objects while Python still holds references to them (PyQt) or require a manual call to deallocate a widget tree (wxPython). Python knows when it's time to deallocate C resources, and then makes a call to the tp_dealloc member of the type object. -- http://mail.python.org/mailman/listinfo/python-list