cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shaz...@apache.org
Subject ios commit: Retain cycle fix
Date Fri, 08 Mar 2013 06:30:05 GMT
Updated Branches:
  refs/heads/master 97b89edfa -> 24cdf446c


Retain cycle fix


Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/24cdf446
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/24cdf446
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/24cdf446

Branch: refs/heads/master
Commit: 24cdf446c9cfab2d50fc41886e9ffaa908db272d
Parents: 97b89ed
Author: Shazron Abdullah <shazron@apache.org>
Authored: Thu Mar 7 22:29:57 2013 -0800
Committer: Shazron Abdullah <shazron@apache.org>
Committed: Thu Mar 7 22:29:57 2013 -0800

----------------------------------------------------------------------
 CordovaLib/Classes/CDVViewController.m |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/24cdf446/CordovaLib/Classes/CDVViewController.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVViewController.m b/CordovaLib/Classes/CDVViewController.m
index dfeee6f..684a078 100644
--- a/CordovaLib/Classes/CDVViewController.m
+++ b/CordovaLib/Classes/CDVViewController.m
@@ -289,12 +289,13 @@
     }
 
     if (hideKeyboardFormAccessoryBar) {
+        __weak CDVViewController* weakSelf = self;
         [[NSNotificationCenter defaultCenter] addObserverForName:UIKeyboardWillShowNotification
                                                           object:nil
                                                            queue:[NSOperationQueue mainQueue]
                                                       usingBlock:^(NSNotification * notification)
{
                 // we can't hide it here because the accessory bar hasn't been created yet,
so we delay on the queue
-                [self performSelector:@selector(hideKeyboardFormAccessoryBar) withObject:nil
afterDelay:0];
+                [weakSelf performSelector:@selector(hideKeyboardFormAccessoryBar) withObject:nil
afterDelay:0];
             }];
     }
 


Mime
View raw message