Fixed bug 1236 - CreateCGImageSourceFromRWops leaks
authorSam Lantinga <slouken@libsdl.org>
Sat, 31 Dec 2011 12:38:49 -0500
changeset 283ec183abd5996
parent 282 e0527402f476
child 284 5e26e77b30bf
Fixed bug 1236 - CreateCGImageSourceFromRWops leaks

Mike 2011-06-24 00:41:23 PDT

CGDataProviderRef must be cleaned after usage.

Here is a proposed patch
IMG_ImageIO.m
     1.1 --- a/IMG_ImageIO.m	Sat Dec 31 12:36:11 2011 -0500
     1.2 +++ b/IMG_ImageIO.m	Sat Dec 31 12:38:49 2011 -0500
     1.3 @@ -109,6 +109,7 @@
     1.4      // Get the CGImageSourceRef.
     1.5      // The dictionary can be NULL or contain hints to help ImageIO figure out the image type.
     1.6      source_ref = CGImageSourceCreateWithDataProvider(data_provider, hints_and_options);
     1.7 +    CGDataProviderRelease(data_provider);
     1.8      return source_ref;
     1.9  }
    1.10