diff options
author | Tor Arne Vestbø <tor.arne.vestbo@digia.com> | 2013-09-03 14:49:09 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-09-11 21:50:46 +0200 |
commit | fc2b36ca1def7301c4af8b3ad2dca2f5a1b0a568 (patch) | |
tree | b0904c76a415783fb6414ea89d6e637eb34c9ffd /mkspecs | |
parent | ba7da9b733f2c5fc75ddbf73e2615bee1663c5b4 (diff) |
iOS: Guard against this and self being deleted when using dispatch_async
When the QIOSApplicationState object owned by the platform integration
was deleted we would deallocate QIOSApplicationStateListener, but would
then get a callback on the main queue later on where we would reference
the now invalid 'this' variable.
By moving the dispatch_async call to QIOSApplicationStateListener and
using 'self' we ensure that the listener is retained for as long as the
block is valid. This opens us up for receiving application state callbacks
after QCoreApplication has been deleted, so we need to guard against
that.
Change-Id: I2ac14d28d72fd79764e12b6657234b54d846cb79
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Diffstat (limited to 'mkspecs')
0 files changed, 0 insertions, 0 deletions