Use g_object_get(CAST_TO_PARENT_TYPE(obj), "x", &x, NULL); On Tue, Dec 18, 2012 at 4:57 AM, Günther Wutz <[email protected]> wrote:
> Hi, > > i have read the development stuff about GObject initialization and > destruction of an Object. But i have currently a problem, which drives > me crazy. > > I have an Class A, which stores two Integer as properties (say x and y) > and an Class B which inherits from A and makes a multidimensional array > on the heap with size x*y. In my finalize method i want to free the > dynamically allocated multidimensional array, therefore i ned the > borders from Class A. If i write g_object_get(obj, "x", &x, NULL); i get > an > > GLib-GObject-CRITICAL **: g_object_ref: assertion `object->ref_count > > 0' failed > > GLib-GObject-CRITICAL **: g_object_unref: assertion `object->ref_count > > 0' failed > > Especially the cast to Class A fails. How would i do this correctly? > > I hope somebody out there can help me to understand this issue. > > Günther > > _______________________________________________ > gtk-list mailing list > [email protected] > https://mail.gnome.org/mailman/listinfo/gtk-list > -- Everything is Original.
_______________________________________________ gtk-list mailing list [email protected] https://mail.gnome.org/mailman/listinfo/gtk-list
