Jump to content

  • Log In with Google      Sign In   
  • Create Account

Memory usage problem on SwapChain.ResizeBuffers


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
No replies to this topic

#1 SeVeNMGG007   Members   -  Reputation: 123

Like
0Likes
Like

Posted 26 June 2013 - 12:00 PM

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.



Sponsor:



Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS