wpf - Process memory increasing after switching user -
I have developed an app that runs on windows. It uses a 5 minute timer to start the connection for a web service and checks for any updates in the datatale.
If there is a change - it pops a WPF window on the client and displays a message. / P>
This program runs in our domains using logon scripts, and runs with users' accounts.
Recently we have seen a problem, and found that the application was using the process
After looking at it, we detected the problem:
The app runs on Windows XP and Windows 7 PCs. In Window 7, if a user uses the "switch user" option, the user's process continues, and the 5-minute timer is still running. When a change occurs, and a message is displayed, When we close the timer, and then use the "switch user" - a problem There was no process and a normal memory usage was stuck. What can we do? Any suggestions? Thanks I use the following method to enumerate existing users I am If you use it and compare it with it, it can work in your app: If there is no match - stop the example. If you have a memory leak, then it can suggest that a vanishing disappearance in your system. I would wonder if you have ended up with enough examples to be eligible for 2 GB memory allocation. PS - You need to add in the context of the system. Management
Management object explorer explorer = new management object finder ("user name selected from Win32_ComputerSystem"); ManagementObjectCollection Archive = Explorers Get (); Foreign Currency (Various users in the collection. Cast and Lieutenant; managementbj & gt; ()) {Console.WriteLine (user ["user name"]); }
System.Security.Principal. WindowsIdentity.GetCurrent (). Name
Comments
Post a Comment