Reputation: 1150
I've recently been playing around with the Process class, however, I've come across something a bit peculiar.
When I execute the following code, after I have closed all instances of Chrome:
foreach(var p in Process.GetProcesses().OrderBy(p => p.ProcessName))
{
if(p.ProcessName == "chrome")
string.Format("{0}: {1} - {2}", p.Id, p.ProcessName).Dump();
}
The strange thing is that it still shows multiple chrome processes running. How is this possible?
Upvotes: 0
Views: 124
Reputation: 11717
Chrome per default preserves its processes when they are started by a plugin. So, if you have any plugin installed, this process will remain in memory after you have once started Chrome - even after you have closed the browser. This is done due to performance reasons - almost all plugins will go through a fairly extensive initialization phase on startup (login, data retrieval etc.). You can change this in Chrome's settings.
Upvotes: 1