There is a memory leak:
void _1()
{
Texture t_up;
t_up.loadFromFile(String(L"GUI\\Textures\\Up.png"));
}
while (1)
{
Thread t(&_1);
t.launch();
t.wait();
}
No memory leaks:
void _1()
{
Texture t_up;
t_up.loadFromFile(String(L"GUI\\Textures\\Up.png"));
}
while (1)
{
_1();
}
How to load textures in a multi-thread and not get memory leaks?
SFML 2.5.0 Visual Studio 15