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 fo
ld 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 registeri
> *- 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 g_object_wea
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 p