SFML community forums

Help => Graphics => Topic started by: pogrady on December 17, 2012, 04:57:41 am

Title: Releasing the Texture
Post by: pogrady on December 17, 2012, 04:57:41 am
Hello,

Lets say that I want to reuse the same texture object, but load anther texture from memory.  If I load another from memory, does the function release the existing texture?

sf::Texture t;
t.loadFromFile("pic.bmp");

//...stuff

t.loadFromFile("pic2.bmp");
 

does the second call to sf::Texture::loadFromFile(...) release the existing texture in memory?

Patrick
Title: Re: Releasing the Texture
Post by: Laurent on December 17, 2012, 07:55:22 am
Of course it does.