SFML community forums
Help => General => Topic started by: Travnick on February 03, 2011, 08:29:44 pm
-
I made a little program. Valgrind found memory leaks in it. It look like SFML memory leaks, but it could be my mistake as well:
program code:
http://wklej.org/id/469701/
Valgrind errors:
valgrind --leak-check=full --show-reachable=yes -v --log-file=val.txt ./sfmlTest
http://wklej.org/id/469698/
-
It's ok, they are under control ;)
Thanks anyway for reporting them.
-
It's ok, they are under control ;)
so you mean that they will be fixed? in which version?
-
It's a single leak, and it was produced on purpose. And it's already fixed in SFML 2.
-
It's a single leak, and it was produced on purpose. And it's already fixed in SFML 2.
My curiosity has the best of me with this one, what use does an intentional leak have?
-
My curiosity has the best of me with this one, what use does an intentional leak have?
Not causing a crash, because the object can only be destroyed at global scope, but then there's no guaratee that everybody likes that (global exit is a mess, nobody knows the order of destruction of global objects) -- sometimes causing random crashes.
Well, I know it's a bit ugly, it was more a quick and dirty fix than a clean solution. The clean fix is in SFML 2.