Re: Creating custom GTK+ widget using C++ -- Ctor/Dtor not called
- From: Hrvoje Niksic <hrvoje niksic avl com>
- To: agnel kurian gmail com
- Cc: gtk-list gnome org
- Subject: Re: Creating custom GTK+ widget using C++ -- Ctor/Dtor not called
- Date: Thu, 16 Feb 2012 10:32:36 +0100
On 02/15/2012 11:35 PM, Agnel Kurian wrote:
contained object were not being called. I had assumed that merely
compiling as C++ would make it work... but now I realize it need not be
so when allocated via g_object_new.
Note that you can always call placement new in your gobject constructor
and explicitly invoke the C++ destructor in the gobject destructor.
That way, even when created via g_object_new, your class will be
correctly constructed in the C++ sense. Google "placement new" for more
] [Thread Prev