Return-Path: X-Original-To: apmail-cordova-commits-archive@www.apache.org Delivered-To: apmail-cordova-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 69FA29CB5 for ; Fri, 8 Mar 2013 06:30:08 +0000 (UTC) Received: (qmail 38332 invoked by uid 500); 8 Mar 2013 06:30:08 -0000 Delivered-To: apmail-cordova-commits-archive@cordova.apache.org Received: (qmail 38285 invoked by uid 500); 8 Mar 2013 06:30:06 -0000 Mailing-List: contact commits-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: callback-dev@cordova.apache.org Delivered-To: mailing list commits@cordova.apache.org Received: (qmail 38265 invoked by uid 99); 8 Mar 2013 06:30:06 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Mar 2013 06:30:06 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id CA09B831BF8; Fri, 8 Mar 2013 06:30:05 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: shazron@apache.org To: commits@cordova.apache.org X-Mailer: ASF-Git Admin Mailer Subject: ios commit: Retain cycle fix Message-Id: <20130308063005.CA09B831BF8@tyr.zones.apache.org> Date: Fri, 8 Mar 2013 06:30:05 +0000 (UTC) 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 Authored: Thu Mar 7 22:29:57 2013 -0800 Committer: Shazron Abdullah 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]; }]; }