Hi, On Sun, 08 Mar 2009 20:03:15 +0100, Emmanuele Bassi <[email protected]> wrote:
On Sun, 2009-03-08 at 12:13 +0100, Lukas Ruetz wrote:My application is a simple version of an image-slideshow. When the next image is shown I call clutter_actor_destroy(previousActor) on the old actor. Is that enough to free the memory used by the texture?yes.The used memory increases (a lot) with each image and nothing is freed.Clutter uses the GLib slice allocator, which will reuse the allocated memory whenever it's possible.
This seems not to be the case with my test app.
I'm using clutter-0.9.0 on Ubuntu (2.6.27) with an nvidia card and the nvidia driver (177.82). valgrind output: ==8572== LEAK SUMMARY: ==8572== definitely lost: 0 bytes in 0 blocks. ==8572== possibly lost: 284,308 bytes in 44 blocks. ==8572== still reachable: 176,859 bytes in 2,518 blocks. ==8572== suppressed: 0 bytes in 0 blocks.follow these instructions: http://live.gnome.org/Valgrind before running Valgrind with a GObject-based application/library like Clutter. I routinely run Clutter tests under Valgrind and while there might be small leaks somewhere that I've yet to discover, Clutter does not leak. any eventual leaks found using a proper Valgrind session are bugs, and for those we have: http://bugzilla.openedhand.com/enter_bug.cgi?product=Clutter so if you find any leak, file a bug attaching the log from Valgrind.
Maybe I was not clear - I meant that the "leak" or better memory consumption
is in my code because I was not sure how to free the used memory. I didn't assume that clutter has a problem with loading/freeing ordinary images. My question is - how to show one image after another and free the used image-memory without having the app eating up all the memory?I've reduced the test-code as much as possible and attached it. What's wrong?
(Start it with an dir as argument that contains images.)
ciao, Emmanuele.
Thanks for your help, Lukas
findmembug.c
Description: Binary data
make_findmembug.sh
Description: Binary data
