GIOChannels and refcounts.
- From: Tristan Van Berkom <vantr touchtunes com>
- To: gtk-app-devel-list gnome org
- Subject: GIOChannels and refcounts.
- Date: Thu, 03 Jun 2004 14:31:34 -0400
Hmmm,
strangly enough I've managed to never ponder this before, maybe
my apps are leeking memory :-/
Can anyone tell me if this code would leek ?
/* ... readjust some stuff, now I need a channel ... */
g_io_channel_unix_new(fd); // created with refcount 1
source = g_io_channel_add_watch(channel...); // refcount is now 2
/* ... readjust some stuff, now I dont need this channel ... */
g_source_remove(source); // does this decrement io channels
// refcount ?
g_io_channel_unref(channel); // does this channel get freed ?
Cheers all,
-Tristan
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]