When a window is closed, the AtomCefClient is destroyed.

This commit is contained in:
Corey Johnson 2012-11-07 15:43:58 -08:00
parent 3860fe1de7
commit e96d1b07d3
2 changed files with 7 additions and 11 deletions

View File

@ -142,15 +142,7 @@ bool AtomCefClient::OnKeyEvent(CefRefPtr<CefBrowser> browser,
}
void AtomCefClient::OnBeforeClose(CefRefPtr<CefBrowser> browser) {
REQUIRE_UI_THREAD();
// TODO: Ask Marshal. This was in cefclient... was there a good reason?
// if(m_BrowserHwnd == browser->GetWindowHandle()) {
// // Free the browser pointer so that the browser can be destroyed
// m_Browser = NULL;
// }
// REQUIRE_UI_THREAD(); // When uncommented this fails when app is terminated
m_Browser = NULL;
}

View File

@ -11,12 +11,16 @@
@synthesize devToolsView=_devToolsView;
- (void)dealloc {
_cefClient = NULL;
_cefDevToolsClient = NULL;
[_splitView release];
[_devToolsView release];
[_webView release];
[_bootstrapScript release];
[_resourcePath release];
[_pathToOpen release];
_cefClient = NULL;
_cefDevToolsClient = NULL;
[super dealloc];
}