Memory Issues managing multiple WPF WebViews
I noticed memory not being reclaimed when opening and closing multiple WebView instances in WPF.
The application is wrapped with CEF.Initialize and Shutdown.
I give the ability to open multiple WebViews each with a different address and close them at will. Calling dispose is hit or miss, resulting sometimes in a C++ runtime error - "pure virtual function call," or in issues with the runtime callable wrapper.
I've read through other issues and saw that most people only handle one WebView. Does anyone have any good examples of handling multiple WebViews in WPF?
I have experienced similar issues. I think the "right" answer is to call Dispose() every time you ditch a WebView. However, as you say, this often causes exceptions, especially on subsequent JavaScript interop calls. Right now I'm just trying to limit the number of times I need to dispose a WebView (make them singleton and re-use as often as possible), but I too would like to see a solution for this.
If this issue is still nagging you then have a look at the #249 Pull Request. It would be great to know if it resolves the issue you guys see or not.
@jasonds can u try again with the current master i did some dispose work
Please upgrade to CefSharp3 if there's still a problem. If you experience issues with the latest release please create a new issue :smile: