incubator-callback-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shaz...@apache.org
Subject ios commit: Fixed static-analyzer warnings.
Date Fri, 23 Mar 2012 11:00:02 GMT
Updated Branches:
  refs/heads/master bd4345411 -> 14069215c


Fixed static-analyzer warnings.


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

Branch: refs/heads/master
Commit: 14069215c5d896cb7c2382d9b995a135686a2922
Parents: bd43454
Author: Shazron Abdullah <shazron@apache.org>
Authored: Fri Mar 23 03:59:53 2012 -0700
Committer: Shazron Abdullah <shazron@apache.org>
Committed: Fri Mar 23 03:59:53 2012 -0700

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


http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/14069215/CordovaLib/Classes/CDVViewController.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVViewController.m b/CordovaLib/Classes/CDVViewController.m
index f94814b..633b116 100644
--- a/CordovaLib/Classes/CDVViewController.m
+++ b/CordovaLib/Classes/CDVViewController.m
@@ -802,14 +802,13 @@ BOOL gSplashScreenShown = NO;
         NSDictionary* classSettings = [self.settings objectForKey:className];
 		
         if (classSettings) {
-            obj = [[NSClassFromString(className) alloc] initWithWebView:webView settings:classSettings];
+            obj = [[[NSClassFromString(className) alloc] initWithWebView:webView settings:classSettings]
autorelease];
         } else {
-            obj = [[NSClassFromString(className) alloc] initWithWebView:webView];
+            obj = [[[NSClassFromString(className) alloc] initWithWebView:webView] autorelease];
         }
         
         if (obj != nil && [obj isKindOfClass:[CDVPlugin class]]) {
             [self registerPlugin:obj withClassName:className];
-            [obj release];
         } else {
             NSLog(@"CDVPlugin class %@ (pluginName: %@) does not exist.", className, pluginName);
         }


Mime
View raw message