   [d3d11]How can I deallocate resource memory?
  Im confuse..My application is saving 400 renderized frames to a std::vector of ID3D11Texture2D*. After save all that to files or before resaving again 400 new frames, I call the Release() method to each of the textures, and clean the vector, but that doesnt deallocates memory..since the user can save those frames any time he wants, my app are consuming a huge amount of memory while its suppose to consume always the same amount(since theres always only 400 textures)..At exit theres no leak..for( UINT i=0; i<VtexturesIframes.size(); i++ ){if( VtexturesIframes )VtexturesIframes->Release();}std::vector<ID3D11Texture2D*>().swap(VtexturesIframes);//VtexturesIframes.clear();...ID3D11Texture2D *pRenderizedFrame = NULL;pDevice_p->CreateTexture2D( &frameTexdesc_p, NULL, &pRenderizedFrame );//copy data from rtvpDContext_p->CopyResource( pRenderizedFrame, pRTV_Texture_p );//add texture to vectorVtexturesIframes.push_back( pRenderizedFrame );So, how can I control that? Am I missing something?EDIT--Every time the user save the frames, more memory is used.   
  I still need help on this, anyone know what I should do?   ;  How are you clearing the vector since, the clear code is commented out?;  The swap thing clean and trim the vector..I made it just to meake sure was a dx memory thing..dcontext->flush() solves the problem, but it have a very weird behavior..Im calling it everytime the user is going to save the new frames, but it just stops allocating new memory at the third time, with means my app consumes an average amount of 1.300.000 K of memory(info from task manager)..at the first save it just consumes 660.000 K...Theres anyway I can control it?   ;  holy shit o.O..calling flush 3 times solves it..what a ridiculous piece of code:if( !bSavedBuffersForActualANIM ){pDContext_p->Flush();pDContext_p->Flush();pDContext_p->Flush();} Anyone have similar needs about dx and memory? How do u solve it?..   ;Quote:(info from task manager)Not a particularly useful metric for all things. Windows likes to keep memory in your program's "working set". You can allocate 100Mb of data, then free it all, and Taskman might still show 100Mb of useage.  Windows may or may not eventually decided to clean out your working set of pages your application doesn't need.The other thing to note, you can allocate 100Mb of data, and free 90Mb of data and still have 100Mb of useage due entierly to fragmentation. The remaining 10Mb are all spread out inside the origional 100Mb block, and thus you are still actively using all of that 100Mb as far as windows is concerned.How are you saving your data? For what are you collecting the textures?I'm fairly sure you could just reuse the same 400 textures, instead of creating and releasing them all the time. (OpenGL atleast, lets you replace texture data). That would keep you from thrashing your memory around.   ;  Its for save an animation, I was limiting on 400 for testing, it can be anything..Im sure for such a complex stuff theres millions of optimized ways of doing this, Im just keeping it simple..   