Archived

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

Texture memory still hanging around

This topic is 5011 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

Hi.. Have come across a small problem, not sure whether its a driver bug or i''m not doing something I should be, but I have this demo that uses depth-shadow maps and have included the facility for the user to toggle the resolution of the shadow maps between varying sizes. Now, when this event occurs, I release the texture that is currently being used and create another one to replace it; which is fine, except after a few toggles and releasing/creating textures Direct3D reports that it has run out of video memory - I would have thought that releasing a texture also invalidates the memory on the card and can be overwritten - is this not so? Is there a way to manually flush unused memory from the card? Cheers for any info

Share this post


Link to post
Share on other sites
Release() will release the texture - provided it''s not referenced anywhere else, as you know D3D Objects are reference counted.
Perhaps there is a reference you''ve left still hanging around, perhaps as a bound texture?

Another way to test might be to crank up the debug output level for Direct3D and look for memory leaks when your app shuts (do some simple testing so you can narrow it down). This might give you more info on your leaks, if you have any.

-Mezz

Share this post


Link to post
Share on other sites