Python and GTK+: How to create garbage collector friendly objects?
问题 I started writing a small application in Python with GTK+ as my widget toolkit. Recently I decided to do some memory optimization and noticed that a most of PyGTK objects I create never gets released by garbage collector. This number keeps growing even if I open a window and properly destroy it afterward. Can someone point me in the right direction on how to create and handle GTK+ objects from Python. Am not using Glade or anything like that. Also I noticed that creating window like this: