仪器检测到此代码存在内存泄漏
- (UIImage *)blurryOriginalImageWithLevel:(CGFloat)blur
{
CIImage *inputImage = [CIImage imageWithCGImage:[UIImage imageNamed:@"ss"].CGImage];
CIFilter *filter = [CIFilter filterWithName:@"CIGaussianBlur"
keysAndValues:kCIInputImageKey, inputImage,
@"inputRadius", @(blur),
nil];
CIImage *outputImage =inputImage;
if (filter) {
outputImage=filter.outputImage;
}
CIContext *context = [CIContext contextWithOptions:nil];
CGImageRef outImage = [context createCGImage:outputImage fromRect:[inputImage extent]];
UIImage *image = [UIImage imageWithCGImage:outImage];
CGImageRelease(outImage);
return image;
}
截图:
但我在这段代码中找不到任何问题,我错了吗?