diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2019-02-12 14:06:08 +0100 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2019-02-12 22:19:38 +0000 |
commit | 81fd7f4c8af260d753a834480f790c82fb161889 (patch) | |
tree | ba7ce914552afb40c4df160d208edef787091426 | |
parent | 38504041148f2d1cffea6520ea448dd4171adb0b (diff) | |
download | qtbase-81fd7f4c8af260d753a834480f790c82fb161889.tar.gz |
macOS: Add auto-release pool during QCocoaScreen::deliverUpdateRequests()
Checking the application's keyWindow will autorelease the window, and
there's no root pool in place when called from the display-link thread.
Change-Id: Ic43164ad6397c92b858fb549f7a00e28b6110849
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoascreen.mm | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoascreen.mm b/src/plugins/platforms/cocoa/qcocoascreen.mm index 80dd7e40d3..830a387fd1 100644 --- a/src/plugins/platforms/cocoa/qcocoascreen.mm +++ b/src/plugins/platforms/cocoa/qcocoascreen.mm @@ -269,6 +269,8 @@ struct DeferredDebugHelper void QCocoaScreen::deliverUpdateRequests() { + QMacAutoReleasePool pool; + // The CVDisplayLink callback is a notification that it's a good time to produce a new frame. // Since the callback is delivered on a separate thread we have to marshal it over to the // main thread, as Qt requires update requests to be delivered there. This needs to happen |