Re: GObject: Freeing memory of instance members?



David Nečas (Yeti) wrote:
> Actually, what you should do is to use a macro from the
> G_DEFINE_TYPE() family that does these things automaticaly
> (the parent class variable is named <my_type>_parent_class).

Wow! A really powerful macro. I actually had to run a 'gcc -E' to
convince myself. Here's what it does:

Declare the functions:
<my_type>_init
<my_type>_class_init

Generate the functions:
<my_type>_class_intern_init (which sets the parent_class)
<my_type>_get_type

declare the variable:
<my_type>_parent_class

Why hasn't anyone told me of this macro before? Do you also have a macro
that cleans my house og does the laundry?

Thanks,
-Øystein






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]