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>
bb10
Gabriel de Dietrich 2012-11-21 16:19:21 +01:00 committed by The Qt Project
parent 4bddcf9c41
commit 8a091a848b
1 changed files with 2 additions and 0 deletions

View File

@ -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];