Re: newbie question about g_object unref()



Nader Morshed,

On Thu, Nov 18, 2010 at 8:21 PM, Nader Morshed <morshed nader gmail com> wrote:

#define G_OBJECT_UNREF_AND_NULLIFY(ptr) { \
   Âg_object_unref(ptr); \
   Â(ptr) = NULL; \
}


Not a good idea: the object may still hold a reference, and nullifying
the pointer would probably nullify the only way to access the object.

Cheers,
    Leandro



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