Original Post
I''m trying to deallocate memory from texture surfaces in the game to replace images, and to free up memory by getting rid of images that aren''t being used by the game, but it''s not working like I''m expecting it to. First of all, using IDirectDrawSurface::Release() isn''t freeing up the memory... I''m not making calls to addref() on any surface, so the reference count shouldn''t be anything other than 1. I tried using the delete operator on the LPDIRECTDRAWSURFACE pointer, but that''s not freeing up the memory either.
Info about my program: it''s using D3DCreateTextureFromFile(...) to load a texture to a surface. I basically have an array of surfaces that point to different textures in a class I call CGraphics. Everything else is working like I want it to, except for this memory freeing glitch. I was hoping that the Release() function would do exactly what I want it to, but when I call Release() on all the surfaces in the array, memory usage (as dictated by the memory usage statistics provided in Windows 2000) doesn''t decrease at all.
The strange thing is, when the program is run on my computer or any other windows 9x running computer, RAM usage goes down to exactly where it started before the application began executing, so I don''t think I have any memory leak issues.
Thanks for your help!
-Aaron