Hello,
Recently I noticed a memory leak in my applications, so I tried to track it down and I think there is something wrong with two SFML functions.
So, my applications were simply ALWAYS allocating memory. Like 4KB/s, by watching the task manager.
I started to look for the problem, and i narrowed it down to this piece of code:
if(myWindow && activeDrawing){
myWindow->SetActive(true);
myWindow->Clear(clearColor);
onRender();
myWindow->Display();
}
That is my "render loop". If i comment those 4 lines,the memory does not increase at all.
Otherwise, it goes nuts. Clear() doesn't seem to do harm, however, Display() is consuming the most. SetActive() is also consuming memory from time to time, but way less than Display().
Can you please discuss this?
EDIT: I was unable to reproduce the problem with a minimal application, therefore i don't really understand why that couple of functions are having that effect while commenting them actually works, in the context of the other app.