Re: all about gobject references

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



A little off-topic, resp. about a similar issue, but I haven't found anyreason for it:I read about using g_mem_set_vtable( glib_mem_profiler_table ) and usingg_atexit( g_mem_profile ). Even in this short example, I still getmemory leaks reported:
#include	<stdlib.h>#include	<gtk/gtk.h>#include	<glib.h>
int main( int argc, char** argv ){  g_mem_set_vtable( glib_mem_profiler_table );  g_atexit( g_mem_profile );
  gtk_init( &argc, &argv );
  return EXIT_SUCCESS;}  $ src/test...GLib Memory statistics (failing operations): --- none ---Total bytes: allocated=967935, zero-initialized=120832 (12.48%),freed=710216 (73.37%), remaining=257719
So even in this simple example there seem to occur memory leaks... Iguess this is not the case, is the memory really freed right away ormight it be freed after the program already exited?..What just confuses me is the fact, that this should be a method forchasing memory leeks, but in such a case, this is not usable.Maybe someone can give a hint?
GreetsDavid Daniel
Am Samstag, den 22.08.2009, 19:32 +0200 schrieb Emmanuel Rodriguez:> > > On Sat, Aug 22, 2009 at 3:12 PM, Tadej Borovšak <tadeboro@xxxxxxxxx>> wrote:>         Hi>         >         > but when i put it throught valgrind tool it says 156 bytes>         loss in memory>         >         >         Analyzing glib code with valgrind requires some preparation or>         false>         positives are reported. Ask your favorite search engine about>         this and>         you should be able to find some documentation.> > Libchamplain's wiki [1] has a section named "Valgrind error> suppression" that shows how to prepare valgrind to behave better with> glib. The instructions should be easy to adapt to any project.> > [1] http://live.gnome.org/libchamplain/contributor> > > > -- > Emmanuel Rodriguez> _______________________________________________> gtk-list mailing list> gtk-list@xxxxxxxxx> http://mail.gnome.org/mailman/listinfo/gtk-list
_______________________________________________gtk-list mailing listgtk-list@xxxxxxxxxxxxx://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux