Freeing resources [SOLVED]

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Amt0571
Posts: 128
Joined: Mon Mar 06, 2006 6:29 pm

Freeing resources [SOLVED]

Post by Amt0571 »

Hello,

In my project there's a system that depending on the player position a different image appears on screen.

Since only one image can be seen at a time, I thought I'll use the same ITexture for all of them. The problem is that when I overwrite the ITexture with a new texture, the old one is not removed from memory.

I have tried to use a drop() before loading the new texture, and this way it frees the memory, but when the new texture is shown, irrlicht crashes.

What's the correct way to unload a texture from memory?

EDIT: Ok... I have just found out:

driver->removeTexture();


Thanks!
Post Reply