Skip to content
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

WebView2 memleak bug solution #825

Open
FiveTechSoft opened this issue Jul 30, 2022 · 1 comment
Open

WebView2 memleak bug solution #825

FiveTechSoft opened this issue Jul 30, 2022 · 1 comment

Comments

@FiveTechSoft
Copy link

When we don't use webview_run() as we use the app main events loop, we get the bug described here:

https://githubhot.com/repo/MicrosoftEdge/WebView2Feedback/issues/2156

As pointed in that thread the solution is this one:

Wow! It can easily be fixed by storing a flag if ICoreWebView2CreateCoreWebView2ControllerCompletedHandler:Invoke() is called. If the flag is false when its destroyed, call release()

Could it be possible to implement such fix into webview.dll ? many thanks

@SteffenL
Copy link
Collaborator

The library does run a message loop temporarily just for WebView2 initialization regardless of whether you call webview_run(). ICoreWebView2CreateCoreWebView2ControllerCompletedHandler will therefore have been invoked already by the time you would normally call webview_run().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants