Re: memory management with glibmm & giomm




You should never need to call unreference() yourself. If this fixes the
memory leak problem,
Yes, it solve my problem.
Now the memory usage is stable and < 700Kb.
Without this unref the memory usage is growing up (very quickly, for example, I need about 50 Mb to scan 3000 files).
then the problem is that
FileEnumerator::next_file() method does add an additional reference to
the return value, although it shouldn't.
the underline C g_file_enumerator_next_file() function return a pointer to a new created GObject (we need to call g_object_unref() to free this object).
Do you think that, there is a bug in the C++ binding?

If you want to test, here is source code of programs :

http://yojik.shtooka.net/gio.cc (giomm version)
http://yojik.shtooka.net/gio.c (gio version)

Regards,
Nicolas



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