这是我的方法:
CVImageBufferRef imageBuffer = CMSampleBufferGetImageBuffer(aSampleBuffer);
CIImage *ciImage = [CIImage imageWithCVPixelBuffer:imageBuffer];
CIContext *context = [CIContext contextWithOptions:nil];
CGImageRef myImage = [context
createCGImage:ciImage
fromRect:CGRectMake(0, 0,
CVPixelBufferGetWidth(imageBuffer),
CVPixelBufferGetHeight(imageBuffer))];
return [UIImage imageWithCGImage:myImage];
但是最后一行 show me 是Potential leak of an object stored into 'myimage'
,而 myImage 的行是Method returns a Core Foundation object with a +1 retain count
. 但是我的应用程序启用了 ARC,所以我什么也做不release
了。我该如何解决?谢谢。