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>
This commit is contained in:
Tor Arne Vestbø 2019-02-12 14:06:08 +01:00
parent 3850404114
commit 81fd7f4c8a

View File

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