iOS: fix memory leak
This commit is contained in:
@@ -761,7 +761,7 @@ - (NSData *)getImagePixels {
|
||||
CGColorSpaceRelease(colorSpace);
|
||||
CGContextRelease(contextRef);
|
||||
|
||||
return [[NSData alloc] initWithBytesNoCopy:imageData length:width * height * bytesPerPixel];
|
||||
return [[NSData alloc] initWithBytesNoCopy:imageData length:width * height * bytesPerPixel freeWhenDone:YES];
|
||||
}
|
||||
|
||||
- (void)dealloc {
|
||||
|
Reference in New Issue
Block a user