Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Releasing the Texture  (Read 1093 times)

0 Members and 1 Guest are viewing this topic.

pogrady

  • Newbie
  • *
  • Posts: 21
    • View Profile
Releasing the Texture
« 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

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Releasing the Texture
« Reply #1 on: December 17, 2012, 07:55:22 am »
Of course it does.
Laurent Gomila - SFML developer