Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Gary

DeleteTextureByIndex

This topic is 6120 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Ok, I create a texture using: TextureNumber = PR_AddTexture (TextureMaterialName, TextureSurface); Now... If I call: if(TextureNumber != -1) PR_DeleteTextureByIndex (TextureNumber); The PR Log reports a memory leak. However, if I comment out this line, and let the PR_DeleteAllTextures free it, it no longer gives me a memory leak in the log file. Using the debugger I watched the memory for the texture and it does look like it is being freed. Maybe the memory manager just isn''t catching it? or what is going on here... Gary

Share this post


Link to post
Share on other sites
Advertisement
You still need to call PR_DeleteAllTextures before the program ends, because it frees the pointer to the texture list itself, in addition to all the textures stored within.




Author of Power Render (http:/www.powerrender.com)

Share this post


Link to post
Share on other sites
I am...


If I call:
if(TextureNumber != -1) PR_DeleteTextureByIndex (TextureNumber);
PR_DeleteAllTextures();

It reports a memory leak;

If I call:
PR_DeleteAllTextures();


It doesnt....



Gary

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!