incubator-callback-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From becka...@apache.org
Subject git commit: Fixed memory allocation warnings from analyzer
Date Wed, 08 Feb 2012 20:13:02 GMT
Updated Branches:
  refs/heads/master b6a08f2cb -> abd3fed32


Fixed memory allocation warnings from analyzer


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/abd3fed3
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/tree/abd3fed3
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/diff/abd3fed3

Branch: refs/heads/master
Commit: abd3fed32659608326f8ddcd3d9b5df1b9013f4a
Parents: b6a08f2
Author: Becky Gibson <becka11y@apache.org>
Authored: Wed Feb 8 15:12:24 2012 -0500
Committer: Becky Gibson <becka11y@apache.org>
Committed: Wed Feb 8 15:12:24 2012 -0500

----------------------------------------------------------------------
 PhoneGapLib/Classes/FileTransfer.m |    2 +-
 PhoneGapLib/Classes/PGWhitelist.m  |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/abd3fed3/PhoneGapLib/Classes/FileTransfer.m
----------------------------------------------------------------------
diff --git a/PhoneGapLib/Classes/FileTransfer.m b/PhoneGapLib/Classes/FileTransfer.m
index 4acd915..83a77dd 100644
--- a/PhoneGapLib/Classes/FileTransfer.m
+++ b/PhoneGapLib/Classes/FileTransfer.m
@@ -204,7 +204,7 @@
 
     NSLog(@"File Transfert Download success");
     
-    PGFile * file = [[PGFile alloc] init];
+    PGFile * file = [[[PGFile alloc] init] autorelease];
     
     PluginResult* result = [PluginResult resultWithStatus: PGCommandStatus_OK messageAsDictionary:
[file getDirectoryEntry: filePath isDirectory: bDirRequest] cast: @"window.localFileSystem._castEntry"];
     [self writeJavascript: [result toSuccessCallbackString:callbackId]];

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/abd3fed3/PhoneGapLib/Classes/PGWhitelist.m
----------------------------------------------------------------------
diff --git a/PhoneGapLib/Classes/PGWhitelist.m b/PhoneGapLib/Classes/PGWhitelist.m
index 8e7cc4b..412478e 100644
--- a/PhoneGapLib/Classes/PGWhitelist.m
+++ b/PhoneGapLib/Classes/PGWhitelist.m
@@ -62,7 +62,7 @@
     }
     
     // restrict number parsing to 0-255
-    NSNumberFormatter* numberFormatter = [[NSNumberFormatter alloc] init];
+    NSNumberFormatter* numberFormatter = [[[NSNumberFormatter alloc] init] autorelease];
     [numberFormatter setMinimum:[NSNumber numberWithUnsignedInteger:0]];
     [numberFormatter setMaximum:[NSNumber numberWithUnsignedInteger:255]];
     


Mime
View raw message