Re: GIOChannel close vs. unref
- From: Helmethead <hoshem mel comcen com au>
- To: Ron Steinke <rsteinke w-link net>
- Cc: otaylor redhat com, gtk-list gnome org
- Subject: Re: GIOChannel close vs. unref
- Date: Mon, 7 May 2001 18:07:08 +1000
On Sun, May 06, 2001 at 09:52:30AM -0700, Ron Steinke wrote:
> > From: Owen Taylor <otaylor redhat com>
> >
> > Generally, mixing up memory management with actions such as closing
> > a stream is a bad idea, though more of an argument could be made
> > for it if the underlying stream was created along with the
> > GIOChannel with g_io_channel_new_from_file().
> >
>
> The g_io_channel_new_from_file() case is exactly what I was worring
> about. Sounds like GIOChannel needs a close_on_final_unref flag.
In most cases I think you just want to create the io channel, add a watch and unref the io channel, and in your watch handler close it at liberty. So it's not all that complicated :)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]