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

improved WebView resource cleanup #291

Merged
merged 1 commit into from Mar 26, 2014
Merged

improved WebView resource cleanup #291

merged 1 commit into from Mar 26, 2014

Conversation

JanEggers
Copy link
Contributor

No description provided.

foreach (var disposable in disposables)
{
disposable.Dispose();
}
GC.Collect();
GC.WaitForPendingFinalizers();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we move these two lines also?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nope the intention of this two lines is that the gc runns and cleans before CefShutdown is called. if the two lines are moved to instance cleanup then there will be a full gc cycle for each instance of webview and that just will slow things down.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, cool. You're right - that makes sense. Merging your fine code now - thanks!

@perlun perlun added this to the 31.0.0 milestone Mar 25, 2014
perlun added a commit that referenced this pull request Mar 26, 2014
Improved WebView resource cleanup
@perlun perlun merged commit 82b734d into cefsharp:master Mar 26, 2014
@JanEggers JanEggers deleted the WebViewCleanup branch March 27, 2014 07:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants