Analyze today, this problem occurs, is a third-party cutting the picture of the class called Vpimagecropper, the results found that he has problems, Look at the picture and everyone will understand. Subimageref Memory Count + 1 when calling Cgimagecreatewithimageinrect, but did not release after the run-up.
Then the problem comes, this vpimagecropper is to support arc, that is, the system encountered this side is not good use, can not be released. So there's a memory leak.
Later on StackOverflow find such a passage
ARC does not manage C-types, the which cgimage may be considered. You must release the ref manually if you were finished withCGImageRelease(image);
that is, not everything in arc mode can be freed. Objects such as c-types need to be released manually
That's all I'm saying. cgimagerelease (subimageref)
Then we look at the problem solved ~
ios-when using Vpimagecropper analyze appears potential leak of an object stored into ' subimageref '