Re: Reference Counting

2006-09-11 Thread Nikhil Dinesh
Reference counting for tree models doesn't behave the same way as for contained components. The tree view adds an additional reference to the model, so in your case your model is never destroyed as the ref count is 2. Try invoking: g_object_unref(model) after you add it to the view. My source

Re: Reference Counting

2006-09-07 Thread Nikhil Dinesh
? g_object_weak_ref should do. Thanks anyway! Matias Nikhil Dinesh escribió: *- Is there a way to pass a function to free certain struct in a GtkTreeModel so GTK frees the allocated space when the model's reference count reach to 0? (without registering it as a G_TYPE).* One way is to register

Re: Reference Counting

2006-09-06 Thread Nikhil Dinesh
*- Is there a way to pass a function to free certain struct in a GtkTreeModel so GTK frees the allocated space when the model's reference count reach to 0? (without registering it as a G_TYPE).* One way is to register the struct as a weak reference to the model, using

Virtual functions and chaining up

2006-07-27 Thread Nikhil Dinesh
Hi, I'm trying to create my own object hierarchy, and I don't understand the part in the API reference about virtual functions and chaining up. To create a virtual public method, the docs say we need to do something like: /* declaration in maman-bar.h. */ struct _MamanBarClass { GObjectClass