summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorMorten Johan Sørvig <morten.sorvig@theqtcompany.com>2016-03-10 12:50:52 +0100
committerMorten Johan Sørvig <morten.sorvig@theqtcompany.com>2016-03-11 11:00:14 +0000
commita2d58025b63d43a843bf14138221086f25c280f8 (patch)
treea8aaf68031b07780ae06926fa51b00df49b76c2c /tests/auto
parent1929e48bba631465c256265a2ed31128e7217aca (diff)
Cocoa: Improve native view lifetime accuracy.
Ideally all native NSWindows and NSViews owned by QCocoaWindow should be deallocated during the QCocoaWindow destructor. In reality this does not always happen since Cocoa is free to hold references to the views after Qt releases its reference. We can help Cocoa clean up: - Clear the first responder for the NSWindow under the ~QCocoaWndow() autoreleasepool. - Use an autoreleasepool to clean up temp objects from [NSWindow orderFront:] immediately. Together this makes the QNSView lifetime be contained by the QCocoaWindow lifetime, at least for simple QWindow usage. It also fixes the observed memory leak reported in QTBUG-51766 Change-Id: Idd224f54ebd6f61f274461a204ff30c666b22768 Task-number: QTBUG-51766 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
Diffstat (limited to 'tests/auto')
0 files changed, 0 insertions, 0 deletions