You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by sh...@apache.org on 2012/03/23 12:00:02 UTC

ios commit: Fixed static-analyzer warnings.

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 <sh...@apache.org>
Authored: Fri Mar 23 03:59:53 2012 -0700
Committer: Shazron Abdullah <sh...@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);
         }