You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ag...@apache.org on 2014/10/10 02:27:57 UTC

git commit: Fix memory leak of image data in imagePickerControllerReturnImageResult

Repository: cordova-plugin-camera
Updated Branches:
  refs/heads/master 8b8db828f -> 0d389857c


Fix memory leak of image data in imagePickerControllerReturnImageResult

A __bridge_retained cast increments the count and requires a CFRelease, this should just be __bridge a cast since it isn’t being held onto by this method.

close #51


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/commit/0d389857
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/tree/0d389857
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/diff/0d389857

Branch: refs/heads/master
Commit: 0d389857cf6b03ddb8e3c7f8a2311cc00e9f3910
Parents: 8b8db82
Author: Kris Selden <kr...@gmail.com>
Authored: Thu Oct 9 16:20:52 2014 -0700
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Thu Oct 9 20:26:45 2014 -0400

----------------------------------------------------------------------
 src/ios/CDVCamera.m | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/blob/0d389857/src/ios/CDVCamera.m
----------------------------------------------------------------------
diff --git a/src/ios/CDVCamera.m b/src/ios/CDVCamera.m
index b2c058a..301187a 100644
--- a/src/ios/CDVCamera.m
+++ b/src/ios/CDVCamera.m
@@ -632,7 +632,7 @@ static NSSet* org_apache_cordova_validArrowDirections;
     CDVPluginResult* result = nil;
     
     if (self.metadata) {
-        CGImageSourceRef sourceImage = CGImageSourceCreateWithData((__bridge_retained CFDataRef)self.data, NULL);
+        CGImageSourceRef sourceImage = CGImageSourceCreateWithData((__bridge CFDataRef)self.data, NULL);
         CFStringRef sourceType = CGImageSourceGetType(sourceImage);
         
         CGImageDestinationRef destinationImage = CGImageDestinationCreateWithData((__bridge CFMutableDataRef)self.data, sourceType, 1, NULL);


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org