Closed FrankGrimesy closed 10 months ago
I see where my service is using this and the mem usage is growing after every cycle but, after looking and the c++ code examples how would this be fixed in the c# code. This was a huge help but if the service I created is just going to keep using more and more memory I will have to restart it weekly and I would rather fix the code to release the unneeded memory than recycling the service.
how would this be fixed in the c# code
It looks, like the topic starter hits the nail on the head - it can be fixed by calling WTSFreeMemory
I would rather fix the code to release the unneeded memory than recycling the service
Yep, that would be great if you could to that. Please share the result, preferably in the form of pull request.
@murrayju This can be closed.
Fixed in #37.
WTSEnumerateSessions parameter ppSessionInfo must be freed by WTSFreeMemory.
See: https://msdn.microsoft.com/en-us/library/aa383833(v=vs.85).aspx https://msdn.microsoft.com/en-us/library/aa383834(v=vs.85).aspx