Re: GIOChannels and refcounts.





--- Tristan Van Berkom <vantr touchtunes com> wrote:
Hmmm,

g_io_channel_unix_new(fd);                   // created with refcount 1
source = g_io_channel_add_watch(channel...); // refcount is now 2


   Don't think this increments the ref_count. (At least I could not see it on
the code. glib 2.4.0 )



/* ... readjust some stuff, now I dont need this channel ... */
g_source_remove(source);              // does this decrement io channels
                                       // refcount ?

  Again, ref_count not touched.





        
                
__________________________________
Do you Yahoo!?
Friends.  Fun.  Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/ 



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