2023-03-15, 14:21:55
Also note that when you manually kill msedgewebview2 processes - even excluding the main browser process id - you WILL end up killing the wrong processes still.
Even if you start a single WebView2 you will get like 5 different processes!
There's the main browser process, at least a single renderer process, a utility process, a GPU process, there can be one or more background processes etc...
If you want to close a WebView2 process then you should use the CloseWebView method, not kill a background process.
The CloseBrowserProcess should only be used if you have no WebView2 processes running anymore. Normally you should not need it as the Browser Process is closed when your application exits.
--
Wil
Even if you start a single WebView2 you will get like 5 different processes!
There's the main browser process, at least a single renderer process, a utility process, a GPU process, there can be one or more background processes etc...
If you want to close a WebView2 process then you should use the CloseWebView method, not kill a background process.
The CloseBrowserProcess should only be used if you have no WebView2 processes running anymore. Normally you should not need it as the Browser Process is closed when your application exits.
--
Wil