Saw that in some example codes, but ive never used it, unless im dynamically opening new different sized textures etc.
So does my OS or something take care of freeing the texture memory when my app is terminated? Or do i have to free it myself ?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Like every other resource, most OSes will free them if you don’t.
Usually, the reason to do it is to make sure you don’t leak any resource while your program is running though. Say for example you load levels, if you don’t free all you textures as you keep loading levels, sooner or later, you will run out of memory. Keeping track of leaks is easier if you clean up on exit.