Running following code constantly consumes RAM. Running for 1 minute consumes ~10 mb of memory.
#include <SFML/Window.hpp>
using namespace std;
int main()
{
sf::Window* wnd = new sf::Window(sf::VideoMode(800, 600, 32), "SFML_test", sf::Style::Close|sf::Style::Titlebar|sf::Style::Resize, sf::ContextSettings(32, 8, 0));
while( wnd->IsOpened() )
{
wnd->Display();
wnd->Close();
wnd->Create(sf::VideoMode(800, 600, 32), "SFML_test", sf::Style::Close|sf::Style::Titlebar|sf::Style::Resize, sf::ContextSettings(32,8,0));
}
return 0;
}
Why is that? Code seems to be valid usage of Close() and Create() methods. I am using Xubuntu linux.