title: How to get Process ID and use EmptyWorkingSet on Windows?
body: <p>I use a game engine, as the game goes on, any unused textures, like from past levels, seem not to be cleared automatically. The developers though state that DirectX does not need to clear its textures manually, it simply swaps them out automatically when not used.</p>
  
  <p>However my game seems to increase its memory usage with each different level. I am still testing for leaks and whatnot, however I'd like to use EmptyWorkingSet winapi function to lower the memory usage.</p>
  
  <p>I do have the HWND of the application, how can I get its proccess id and use EmptyWorkingSet to clear the unused memory?</p>