macOS: Add autorelease-pool when recreating NSWindow
Significantly reduces the number of objects left to rot in the root pool, which is only drained on application shutdown. Change-Id: Iad7520ab083715416d95413a63474b9153f22fb5 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
This commit is contained in:
parent
705c716543
commit
60865878e4
@ -1556,6 +1556,8 @@ void QCocoaWindow::foreachChildNSWindow(void (^block)(QCocoaWindow *))
|
|||||||
*/
|
*/
|
||||||
void QCocoaWindow::recreateWindowIfNeeded()
|
void QCocoaWindow::recreateWindowIfNeeded()
|
||||||
{
|
{
|
||||||
|
QMacAutoReleasePool pool;
|
||||||
|
|
||||||
QPlatformWindow *parentWindow = QPlatformWindow::parent();
|
QPlatformWindow *parentWindow = QPlatformWindow::parent();
|
||||||
qCDebug(lcQpaCocoaWindow) << "QCocoaWindow::recreateWindowIfNeeded" << window()
|
qCDebug(lcQpaCocoaWindow) << "QCocoaWindow::recreateWindowIfNeeded" << window()
|
||||||
<< "parent" << (parentWindow ? parentWindow->window() : 0);
|
<< "parent" << (parentWindow ? parentWindow->window() : 0);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user