I know it doesn't relate to your problem but
#include <SFML\Graphics.hpp>
int main()
{
sf::RenderWindow* test = new sf::RenderWindow();
test->create(sf::VideoMode(800,600,32), "Test", sf::Style::Default);
test->getSize().x;
return 0; //where is test deleted?
}
#include <SFML\Graphics.hpp>
int main()
{
sf::RenderWindow test;
test.create(sf::VideoMode(800, 600, 32), "Test", sf::Style::Default);
test.getSize().x;
//test is destroyed, no leaks
return 0;
}
If you really need to use pointers, you can either switch to a more recent version of VS and use smart pointers (http://msdn.microsoft.com/en-us/library/hh279674.aspx) or use the deprecated auto_ptr (http://www.gotw.ca/publications/using_auto_ptr_effectively.htm) like this:
#include <SFML\Graphics.hpp>
int main()
{
std::auto_ptr<sf::RenderWindow> test(new sf::RenderWindow());
test->create(sf::VideoMode(800, 600, 32), "Test", sf::Style::Default);
test->getSize().x;
//test is destroyed, no leaks
return 0;
}