NSRare / NSGIF

🔮 iOS Library for converting videos to animated GIFs.
MIT License
923 stars 190 forks source link

XCODE analyzer stated that there were three possible sources for memo… #10

Closed khappucino closed 8 years ago

khappucino commented 8 years ago

Someone had found a memory leak and when I ran XCODE analyzer I found a few possible culprits.

XCODE analyzer stated that there were three possible sources for memory leaks. 1) early returning without releasing the CGImageDestinationRef destination. 2) returning with out releasing destination in the CGIMageDestinationFinalize==false case 3) The naming convention of the ImageWithScale method should be CreateImageWithScale or CopyImageWithScale since we return an owned +1 retaincount CFObect. 3) May be just a break in convention (only used to notify users of the api), however XCODE analyzer seems to think it might be a problem.

thanks

sebyddd commented 8 years ago

It seems like the changes do not address #9, but I'm going to merge it for the readability improvements. :+1: