• Content count

  • Joined

  • Last visited

Community Reputation

123 Neutral

About SeVeNMGG007

  • Rank
  1. Hi. This is my first post in these fórums. I hope this is the right subforum for this question.   I'm making a world editor in C# + SharpDX. It may have multiple windows, multiple views of the scene and other 3D views. For this to work, I have a GraphicsManager that initializes and manages a single DX11 Device, and one RenderContext encapsulating Backbuffer, Depth buffer, etc., for each of the windows.   My problem seems to not be directly related to SharpDX, but to DirectX and/or Windows. The problem is that, as I resize a Window, the RenderContext of that window resizes the SwapChain with SwapChain.ResizeBuffers. It works very well, but the old buffers (backbuffer, Z-buffer and their views) seems to not be correctly released (even releasing explicitly through Dispose). The effect of this is that, although my program works ok, Windows process DWM.exe has a very high memory usage after several of these resizes. Normally DWM in my computer is around 15-30MB, but my program makes it fire up to 1GB+. You can perfectly see how the memory usage increases in Task Manager as you resize the window!   So, is there some way to prevent or mitigate this effect?   I already thought about not resizing on every OnResize event, but this doesn't solve the problem, only slows it.   I'd appreciate any help or advice. Thanks.