SFML community forums

Help => Graphics => Topic started by: xzxvvxzx on January 21, 2013, 09:38:09 pm

Title: [SOLVED] Free image memory
Post by: xzxvvxzx on January 21, 2013, 09:38:09 pm
Hello,
I want to know if there is any way to free image memory.
Title: Re: Free image memory
Post by: masskiller on January 21, 2013, 10:19:18 pm
Allocating it to heap and deleting it, letting it go out of scope. I don't see the point in the question, what exactly do you want to achieve? Please explain better.

http://en.sfml-dev.org/forums/index.php?topic=5559.0 (http://en.sfml-dev.org/forums/index.php?topic=5559.0)
Title: Re: Free image memory
Post by: Nexus on January 21, 2013, 10:28:20 pm
Hello,
I want to know if there is any way to free image memory.
It is done automatically by SFML's classes. You need not worry about it, unless you manage memory manually (which you should not do).

Search for RAII to understand the concept of automatic resource management in C++.
Title: Re: Free image memory
Post by: xzxvvxzx on January 22, 2013, 03:58:31 am
Quote
It is done automatically by SFML's classes. You need not worry about it, unless you manage memory manually (which you should not do).

Well, that's what I wanted to know, thanks for answer!