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

Author Topic: [SOLVED] Free image memory  (Read 2245 times)

0 Members and 1 Guest are viewing this topic.

xzxvvxzx

  • Newbie
  • *
  • Posts: 7
    • View Profile
[SOLVED] Free image memory
« on: January 21, 2013, 09:38:09 pm »
Hello,
I want to know if there is any way to free image memory.
« Last Edit: January 22, 2013, 04:00:08 am by xzxvvxzx »

masskiller

  • Sr. Member
  • ****
  • Posts: 284
  • Pointers to Functions rock!
    • MSN Messenger - kyogre_jb@hotmail.com
    • View Profile
    • Email
Re: Free image memory
« Reply #1 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
Programmer, Artist, Composer and Storyline/Script Writer of "Origin of Magic". If all goes well this could turn into a commercial project!

Finally back into the programming world!

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Re: Free image memory
« Reply #2 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++.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

xzxvvxzx

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: Free image memory
« Reply #3 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!