Re: all about gobject references
- From: Siddu <siddu sjce gmail com>
- To: Tadej Borovšak <tadeboro gmail com>
- Cc: gtk-app-devel-list gnome org, gtk-list gnome org
- Subject: Re: all about gobject references
- Date: Sat, 22 Aug 2009 18:22:50 +0530
On Sat, Aug 22, 2009 at 5:51 PM, Tadej Borovšak
<tadeboro gmail com> wrote:
Hi.
> but still after reading thoroughly i am unable to figure out why the
> ref_count would be "4" for gtk_window_new() call ?
After gtk_window_new call, refcount is 1. Additional references are
added by callback mechanism. (Try adding print statement right after
the creation and you'll see.)
Ok i agree :)
i put printf after gtk_main() call and found out that ref_count is 0 which is good way of saying the finalize will be called when the ref_count drops to zero and the memory used for window will be returned back to the heap
which all of this means no mem leak in itself
but when i put it throught valgrind tool it says 156 bytes loss in memory .........
how can i free the code from memleak ?
--
Regards,
~Sid~
I have never met a man so ignorant that i couldn't learn something from him
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]