Re: reference counting using a pointer
- From: Enrico Weigelt <weigelt metux de>
- To: gtk-list gnome org
- Subject: Re: reference counting using a pointer
- Date: Mon, 23 Jul 2001 13:27:41 +0200
Eduardo Pérez Ureta wrote:
>
> Could anyone explain me why don't you use:
>
> void g_io_channel_ref (GIOChannel **channel);
> instead of:
> void g_io_channel_ref (GIOChannel *channel);
<snip>
you could write an macro for the your case, but the old interface
must stay intact.
but the cleanest way is to use an GC. then you simply do
iochannel = NULL; an do not need to call the ref functions anymore.
this is the cleanest and most secure way.
(did you read my posting about garbage collection + glib ?)
btw: i've written some libs which also provide an refcounting memory
allocator,
this also includes finalizers, etc. using this one, there's no need to
write
refcnt functions for each class.
these libs can be found under: http://sourceforge.net/projects/deimos
~-n
_____________________________________
Enrico Weigelt
meTUX IT Services
www: www.metux.de
email: weigelt metux de
phone: +49 36207 51833
cellphone: +49 174 7066481
_____________________________________
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]