L.S., I'm writing a language binding for mzscheme to Gtk. I recently derived a method to do memory mangement for GtkObject and GObjects. An artikle about it can be read here: http://www.elemental-programming.org/mzgtk2-mzgtk2-memory-management.html There is however one case, where I'm in trouble. See "The containment assumption falsified" in this artikle. Now I have one burning question: Is there a decision procedure to determine if some GtkObject or GObject contains an other GObject? E.g., a GtkImage object will contain a GdkPixmap. When asked for, with gtk_image_get_pixmap, the reference count of the returned GdkPixmap will be 1. If my typemapper can decide somehow (e.g. by questioning the GdkPixmap GObject) that it is contained withing another object (the GtkImage GObject), my typemapper can increase the reference count by 1. Any suggestions? Thanks in advance for your answers, Hans Oesterholt-Dijkema |