-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Problem/Bug]: Memory leak? WebView2 and parent window not released after close #4286
Comments
@cuiliang thank you for reporting the issue. I have created work item to take time to look into it. |
@vbryh-msft Besides, if the HostObject used in AddHostObjectToScript() hode a reference of host window, there will be another |
@cuiliang We've fixed the issue in Edge canary 126.0.2536.0+. Please test and let us if WV2 objects are still leaking. Also, there is a small issue in WebView2WpfBrowser where the code isn't calling |
Can we assume this has not been fixed as of yet? Have the same issue on 128.0.2739.42. The instance count continues to grow every time our WPF control creates a WebView2. If we hook into |
Closing this issue as fixed, as it was specific to our sample app. @TWhidden The key is you need to find the right place in your app where you no longer need a specific WebView2 control and ensure Dispose() is getting called. Or re-use existing controls. If you are still running into an issue, feel free to ask a question in our Discussions, or open a bug if you believe there is an issue on the WebView2 side. |
What happened?
Using the smaple application: https://github.com/MicrosoftEdge/WebView2Samples/tree/main/SampleApps/WebView2WpfBrowser
Importance
Moderate. My app's user experience is affected, but still usable.
Runtime Channel
Stable release (WebView2 Runtime)
Runtime Version
120.0.2210.121
SDK Version
1.0.2210.55
Framework
WPF
Operating System
Windows 11
OS Version
No response
Repro steps
See issue description.
Repros in Edge Browser
No
Regression
No, this never worked
Last working version (if regression)
No response
AB#48526819
The text was updated successfully, but these errors were encountered: