You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by be...@apache.org on 2012/02/08 21:13:02 UTC
git commit: Fixed memory allocation warnings from analyzer
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 <be...@apache.org>
Authored: Wed Feb 8 15:12:24 2012 -0500
Committer: Becky Gibson <be...@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]];