diff options
author | Gabriel de Dietrich <gabriel.dedietrich@digia.com> | 2012-11-21 16:19:21 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2012-11-23 17:04:00 +0100 |
commit | 8a091a848b57608a0d7cd4dd9d97f0b21b269905 (patch) | |
tree | 4935e70e9ae8b934d31ea89472626fac8d94a507 /src | |
parent | 4bddcf9c41f6954a66f07af12a824a2b8fb0d196 (diff) |
Cocoa: Make sure child windows' QNSView is properly released
Child QCocoaWindows don't have an assigned NSWindow, but still get a
QNSView as backing store. That QNSView is added as a subview to
the parent window's QNSView. That would leave an unmanaged QNSView
alive.
Change-Id: I10f57fb971f7aa1e278bb0af4217052d1e4bb0bc
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoawindow.mm | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm index e011d1c86f..84b468fccd 100644 --- a/src/plugins/platforms/cocoa/qcocoawindow.mm +++ b/src/plugins/platforms/cocoa/qcocoawindow.mm @@ -214,6 +214,8 @@ QCocoaWindow::~QCocoaWindow() QCocoaAutoReleasePool pool; clearNSWindow(m_nsWindow); + if (parent()) + [m_contentView removeFromSuperview]; [m_contentView release]; [m_nsWindow release]; [m_nsWindowDelegate release]; |