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

Author Topic: freeing image memory  (Read 2374 times)

0 Members and 1 Guest are viewing this topic.

Dinocool

  • Newbie
  • *
  • Posts: 24
    • View Profile
freeing image memory
« on: July 22, 2009, 12:58:04 pm »
How would i go about freeing an image from the RAM?

i.e you load an image, but how do you delete it?

i spose its not as simple as

delete img;

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
freeing image memory
« Reply #1 on: July 22, 2009, 01:09:33 pm »
The memory is freed when the sf::Image instance is destroyed, like any object. So you have nothing to do except properly managing the lifetime of your instances.
Laurent Gomila - SFML developer

blewisjr

  • Newbie
  • *
  • Posts: 23
    • View Profile
freeing image memory
« Reply #2 on: July 26, 2009, 06:48:17 pm »
The wiki has a few resource system that can help you out with this under the source section.

 

anything