Re: [gnet-devel] gnet_conn_set_main_context() issue ... a bug ??
- From: Tim Müller <t i m zen co uk>
- To: gnet-devel-list gnome org
- Subject: Re: [gnet-devel] gnet_conn_set_main_context() issue ... a bug ??
- Date: Tue, 13 May 2008 08:17:04 +0100
On Tue, 2008-05-13 at 10:52 +0800, Kuang-Chun Cheng wrote:
Hi,
> (snip code)
> Please notice that I need to call g_main_context_unref(ctx) twice
> (...)
> I traced the gnet-2.0.8 source code and found
> gnet_conn_set_main_context() will increase GMainContext's reference
> count
> but gnet_conn_delete() or gnet_conn_unref() did not unref it ...
>
> I will consider this as gnet_conn_unref()'s bug ... anyone can confirm
> this ?
>
I think you're right. GConn seems to leak the main context reference.
This should be fixed in SVN trunk now [0].
Oddly enough the unit test didn't show the leak under valgrind (cd
tests/check; make gnet/gnetconn.valgrind).
> I can provide a patch if someone can tell me how to contribute.
Please put patches into gnome bugzilla (product 'gnet'), or send them to
the mailing list, thanks :)
Cheers
-Tim
[0] http://svn.gnome.org/viewvc/gnet/trunk/src/conn.c?r1=480&r2=495
[
Date Prev][Date Next] [
Thread Prev][Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]