SFML community forums

General => General discussions => Topic started by: Dinocool on July 22, 2009, 12:58:04 pm

Title: freeing image memory
Post by: Dinocool 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;
Title: freeing image memory
Post by: Laurent 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.
Title: freeing image memory
Post by: blewisjr 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.