Re: difference b/t g_free & g_object_unref
- From: Olexiy Avramchenko <ath beast stu cn ua>
- To: Jack Wei <cowlemon yahoo com>
- Cc: gtk-list gnome org
- Subject: Re: difference b/t g_free & g_object_unref
- Date: Fri, 18 Oct 2002 10:18:16 +0300
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]