summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Moe Gustavsen <richard.gustavsen@digia.com>2014-11-12 12:14:57 +0100
committerJani Heikkinen <jani.heikkinen@theqtcompany.com>2014-11-12 14:03:03 +0100
commit3e161dcb3dcee13a942bb7f0aca1a1920808acd3 (patch)
treee4922ce30d600a2b803927352d006aa26eff5681
parent8ea5b2852e36c93195987a588d893cc8e5b185ef (diff)
iOS: QtFirstResponderEvent needs to release firstResponder to avoid leak
Without setting firstResponder to 0 upon destruction, the current retain count would never reach zero after the event was used. The result being that QIOSTextResponder was seldom destroyed, which would also affect its inputView etc which would also be kept alive. Change-Id: Ia88e6a9d8764e7e9532487153e5e81a7ad0f9741 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
-rw-r--r--src/plugins/platforms/ios/qiosglobal.mm5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/plugins/platforms/ios/qiosglobal.mm b/src/plugins/platforms/ios/qiosglobal.mm
index 9f10c3e287..3ecd0ca61f 100644
--- a/src/plugins/platforms/ios/qiosglobal.mm
+++ b/src/plugins/platforms/ios/qiosglobal.mm
@@ -141,6 +141,11 @@ int infoPlistValue(NSString* key, int defaultValue)
@end
@implementation QtFirstResponderEvent
+- (void) dealloc
+{
+ self.firstResponder = 0;
+ [super dealloc];
+}
@end