From: "Robert R. Schneck" Message-ID: <1026.209.145.86.33.1125101422.squirrel at math.berkeley.edu> Date: Fri, 26 Aug 2005 17:10:22 -0700 (PDT) Subject: Custom Tree Models To: lablgtk at math.nagoya-u.ac.jp MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit Importance: Normal I'm interested in implementing a custom tree model in LablGTK2. I've written the C code necessary to implement the GObject huha and call back into OCaml to do the actual work. So far, it works fine. The tricky part is the GtkTreeIter. I want to have one of the fields be a Caml value. I gather from a previous post on this list that this might be problematic for reasons of memory leakage. I'm guessing the problem is this: some C code creates a GtkTreeIter, there is an OCaml callback during which a garbage collection is performed, suddenly the value stored in the GtkTreeIter is moved to a different location but the GtkTreeIter doesn't find out. Is that it, or are there going to be other problems? Can anyone think of a way to avoid the problem? Best, Robert