Re: GObject Destruction
- From: Milosz Derezynski <internalerror gmail com>
- To: gtk-list gnome org
- Subject: Re: GObject Destruction
- Date: Tue, 18 Dec 2012 11:22:09 +0100
Use g_object_get(CAST_TO_PARENT_TYPE(obj), "x", &x, NULL);
On Tue, Dec 18, 2012 at 4:57 AM, Günther Wutz
<android gunibert de> 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
gtk-list gnome org
https://mail.gnome.org/mailman/listinfo/gtk-list
--
Everything is Original.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]