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 2013/03/13 22:55:02 UTC
ios commit: Fixed static analyzer issues.
Updated Branches:
refs/heads/master 36acdf55e -> a28c77128
Fixed static analyzer issues.
Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/a28c7712
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/a28c7712
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/a28c7712
Branch: refs/heads/master
Commit: a28c7712810a63396e9f32fa4eb94fe3f8b93985
Parents: 36acdf5
Author: Shazron Abdullah <sh...@apache.org>
Authored: Wed Mar 13 14:54:56 2013 -0700
Committer: Shazron Abdullah <sh...@apache.org>
Committed: Wed Mar 13 14:54:56 2013 -0700
----------------------------------------------------------------------
CordovaLib/Classes/CDVContact.m | 4 +++-
.../project/__TESTING__/Classes/AppDelegate.m | 2 +-
2 files changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/a28c7712/CordovaLib/Classes/CDVContact.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVContact.m b/CordovaLib/Classes/CDVContact.m
index 9efaf10..497ee08 100644
--- a/CordovaLib/Classes/CDVContact.m
+++ b/CordovaLib/Classes/CDVContact.m
@@ -38,7 +38,9 @@ static NSDictionary* org_apache_cordova_contacts_defaultFields = nil;
if ((self = [super init]) != nil) {
ABRecordRef rec = ABPersonCreate();
self.record = rec;
- CFRelease(rec);
+ if (rec) {
+ CFRelease(rec);
+ }
}
return self;
}
http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/a28c7712/bin/templates/project/__TESTING__/Classes/AppDelegate.m
----------------------------------------------------------------------
diff --git a/bin/templates/project/__TESTING__/Classes/AppDelegate.m b/bin/templates/project/__TESTING__/Classes/AppDelegate.m
index 318f793..124a56b 100644
--- a/bin/templates/project/__TESTING__/Classes/AppDelegate.m
+++ b/bin/templates/project/__TESTING__/Classes/AppDelegate.m
@@ -45,7 +45,7 @@
int cacheSizeMemory = 8 * 1024 * 1024; // 8MB
int cacheSizeDisk = 32 * 1024 * 1024; // 32MB
- NSURLCache* sharedCache = [[NSURLCache alloc] initWithMemoryCapacity:cacheSizeMemory diskCapacity:cacheSizeDisk diskPath:@"nsurlcache"];
+ NSURLCache* sharedCache = [[[NSURLCache alloc] initWithMemoryCapacity:cacheSizeMemory diskCapacity:cacheSizeDisk diskPath:@"nsurlcache"] autorelease];
[NSURLCache setSharedURLCache:sharedCache];
self = [super init];