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:

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

declare the variable:

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


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