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>
This commit is contained in:
parent
4bddcf9c41
commit
8a091a848b
@ -214,6 +214,8 @@ QCocoaWindow::~QCocoaWindow()
|
|||||||
|
|
||||||
QCocoaAutoReleasePool pool;
|
QCocoaAutoReleasePool pool;
|
||||||
clearNSWindow(m_nsWindow);
|
clearNSWindow(m_nsWindow);
|
||||||
|
if (parent())
|
||||||
|
[m_contentView removeFromSuperview];
|
||||||
[m_contentView release];
|
[m_contentView release];
|
||||||
[m_nsWindow release];
|
[m_nsWindow release];
|
||||||
[m_nsWindowDelegate release];
|
[m_nsWindowDelegate release];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user