Re: difference b/t g_free & g_object_unref



Hello,

g_free() frees the memory allocated by g_malloc() function, like
free() frees the memory allocated by malloc() in stdlib.

g_object_unref() is completely different. Its the piece of glib object
system. Each object derived from GObject has a special field:
reference counter. g_object_unref() decrements counter, when counter
becomes 0 - object will be destroyed.

Olexiy





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