Re: GIOChannel, how to free?

2007-04-05 Thread Chris Vine
On Thursday 05 April 2007 00:47, Iain * wrote: 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

GIOChannel, how to free?

2007-04-04 Thread Alberto Mardegan
Hi, I hope this is the correct ML to ask something about glib. I'm creating a GIOChannel with g_io_channel_unix_new() and installing it as a source with g_io_add_watch(). Everything works, but I don't know if/how am I suppose to cleanup the things after the file descriptor closes. In the

Re: GIOChannel, how to free?

2007-04-04 Thread Iain *
On 4/4/07, Alberto Mardegan [EMAIL PROTECTED] wrote: But according to the docs, g_io_channel_unix_new() creates the channel with a reference count set to 1, so I guess we need a g_object_unref() somewhere. http://developer.gnome.org/doc/API/2.0/glib/glib-IO-Channels.html#g-io-channel-unref

Re: GIOChannel, how to free?

2007-04-04 Thread Alberto Mardegan
ext Iain * wrote: http://developer.gnome.org/doc/API/2.0/glib/glib-IO-Channels.html#g-io-channel-unref perhaps? Sure. My question is, how many times (and when) do I have to call it? -- http://www.mardy.it -- Geek in un lingua international!

Re: GIOChannel, how to free?

2007-04-04 Thread Iain *
On 4/4/07, Alberto Mardegan [EMAIL PROTECTED] wrote: ext Iain * wrote: http://developer.gnome.org/doc/API/2.0/glib/glib-IO-Channels.html#g-io-channel-unref perhaps? Sure. My question is, how many times (and when) do I have to call it? Once when you've finished with it iain

Re: GIOChannel, how to free?

2007-04-04 Thread Alberto Mardegan
ext Iain * wrote: On 4/4/07, Alberto Mardegan [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 So I may assume that the flow I wrote in my first mail is correct (apart obviously substituting g_object_unref()

Re: GIOChannel, how to free?

2007-04-04 Thread Chris Vine
On Wednesday 04 April 2007 13:49, Iain * wrote: On 4/4/07, Alberto Mardegan [EMAIL PROTECTED] wrote: ext Iain * wrote: http://developer.gnome.org/doc/API/2.0/glib/glib-IO-Channels.html#g-io- channel-unref perhaps? Sure. My question is, how many times (and when) do I have to call

Re: GIOChannel, how to free?

2007-04-04 Thread Iain *
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