On 4/4/07, Chris Vine <[EMAIL PROTECTED]> wrote: > > > Sure. My question is, how many times (and when) do I have to call it? > > > > Once when you've finished with it > > In the context of his original question, that is not right. His original > question was whether the callback returning FALSE avoids the need for an > explicit final call to g_io_channel_unref() to destroy the GIOChannel object, > assuming that before the callback returns false it only has a reference count > of 1.
Well, yes, if you've already dropped the reference count so that its only depending on the watch to live then the watch will clean it up. But that practice would scare me as its non-deterministic as to when the GIOChannel will be destroyed. Common practise would be to keep a reference to the IOChannel and drop it once you've finished with it, which means you know better when its been destroyed. iain _______________________________________________ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list