Hi, this might a bit of a classic one but when using valgrind on my small CSFML program I get 3 fat leaks at exit time despite using sfRenderWindow_destroy(). sfRenderWindow_close() does not change anything and so does free().
It says that leaks come from libsfml-window.so which I don't understand because I link with -lcsfml-window and not -lsfml-window since my whole program is in C.
Maybe there's something I just don't get with CSFML because some sfThreads send some leaks as well despite using sfThread_destroy().
Here is my valgrind output:
==22009== 1,440 bytes in 9 blocks are still reachable in loss record 219 of 234
==22009== at 0x4A4C86E: malloc (vg_replace_malloc.c:312)
==22009== by 0x54995C1: hid_init (in /usr/lib/libusbhid.so.4)
==22009== by 0x514B608: ? ? ? (in /usr/local/lib/libsfml-window.so.2.5.1)
==22009== by 0x5139C87: ? ? ? (in /usr/local/lib/libsfml-window.so.2.5.1)
==22009== by 0x5139449: ? ? ? (in /usr/local/lib/libsfml-window.so.2.5.1)
==22009== by 0x513C366: ? ? ? (in /usr/local/lib/libsfml-window.so.2.5.1)
==22009== by 0x5142E07: ? ? ? (in /usr/local/lib/libsfml-window.so.2.5.1)
==22009== by 0x513C172: ? ? ? (in /usr/local/lib/libsfml-window.so.2.5.1)
==22009== by 0x513B7F6: sf::Window::create(sf::VideoMode, sf::String const&, unsigned int, sf::ContextSettings const&) (in /usr/local/lib/libsfml-window.so.2.5.1)
==22009== by 0x4C9F31F: sfRenderWindow_create (in /usr/local/lib/libcsfml-graphics.so.2.5)
==22009== by 0x20EF92: e_create_win (e_engine.c:87)
==22009== by 0x208692: main (c_dergods.c:80)
==22009==
==22009== 26,771 bytes in 1,701 blocks are still reachable in loss record 233 of 234
==22009== at 0x4A4C86E: malloc (vg_replace_malloc.c:312)
==22009== by 0x4DA957F: strdup (in /lib/libc.so.7)
==22009== by 0x549948B: hid_init (in /usr/lib/libusbhid.so.4)
==22009== by 0x514B608: ? ? ? (in /usr/local/lib/libsfml-window.so.2.5.1)
==22009== by 0x5139C87: ? ? ? (in /usr/local/lib/libsfml-window.so.2.5.1)
==22009== by 0x5139449: ? ? ? (in /usr/local/lib/libsfml-window.so.2.5.1)
==22009== by 0x513C366: ? ? ? (in /usr/local/lib/libsfml-window.so.2.5.1)
==22009== by 0x5142E07: ? ? ? (in /usr/local/lib/libsfml-window.so.2.5.1)
==22009== by 0x513C172: ? ? ? (in /usr/local/lib/libsfml-window.so.2.5.1)
==22009== by 0x513B7F6: sf::Window::create(sf::VideoMode, sf::String const&, unsigned int, sf::ContextSettings const&) (in /usr/local/lib/libsfml-window.so.2.5.1)
==22009== by 0x4C9F31F: sfRenderWindow_create (in /usr/local/lib/libcsfml-graphics.so.2.5)
==22009== by 0x20EF92: e_create_win (e_engine.c:87)
==22009==
==22009== 27,680 bytes in 19 blocks are still reachable in loss record 234 of 234
==22009== at 0x4A4E244: realloc (vg_replace_malloc.c:980)
==22009== by 0x5499546: hid_init (in /usr/lib/libusbhid.so.4)
==22009== by 0x514B608: ? ? ? (in /usr/local/lib/libsfml-window.so.2.5.1)
==22009== by 0x5139C87: ? ? ? (in /usr/local/lib/libsfml-window.so.2.5.1)
==22009== by 0x5139449: ? ? ? (in /usr/local/lib/libsfml-window.so.2.5.1)
==22009== by 0x513C366: ? ? ? (in /usr/local/lib/libsfml-window.so.2.5.1)
==22009== by 0x5142E07: ? ? ? (in /usr/local/lib/libsfml-window.so.2.5.1)
==22009== by 0x513C172: ? ? ? (in /usr/local/lib/libsfml-window.so.2.5.1)
==22009== by 0x513B7F6: sf::Window::create(sf::VideoMode, sf::String const&, unsigned int, sf::ContextSettings const&) (in /usr/local/lib/libsfml-window.so.2.5.1)
==22009== by 0x4C9F31F: sfRenderWindow_create (in /usr/local/lib/libcsfml-graphics.so.2.5)
==22009== by 0x20EF92: e_create_win (e_engine.c:87)
==22009== by 0x208692: main (c_dergods.c:80)
Is there a way I don't know to cleanly exit my program or should I just ignore these?
(btw sorry if this is in the wrong forum but sfRenderWindow is part of the graphics lib not the window one so I don't know)