Mac: Add NSAutoreleasePool in PlatformCreateWindow to make sure CefBrowserHostView is dealloc'ed on window destruction

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1534 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt 2013-11-26 19:45:45 +00:00
parent 4e58096051
commit 19379d98c2
1 changed files with 3 additions and 0 deletions

View File

@ -14,6 +14,7 @@
#include "base/file_util.h" #include "base/file_util.h"
#include "base/mac/mac_util.h" #include "base/mac/mac_util.h"
#include "base/mac/scoped_nsautorelease_pool.h"
#include "base/strings/string_util.h" #include "base/strings/string_util.h"
#include "base/strings/sys_string_conversions.h" #include "base/strings/sys_string_conversions.h"
#include "base/threading/thread_restrictions.h" #include "base/threading/thread_restrictions.h"
@ -315,6 +316,8 @@ bool CefBrowserHostImpl::PlatformViewText(const std::string& text) {
} }
bool CefBrowserHostImpl::PlatformCreateWindow() { bool CefBrowserHostImpl::PlatformCreateWindow() {
base::mac::ScopedNSAutoreleasePool autorelease_pool;
NSWindow* newWnd = nil; NSWindow* newWnd = nil;
NSView* parentView = window_info_.parent_view; NSView* parentView = window_info_.parent_view;