iOS中内存管理的坑
2017-08-22 本文已影响0人
小东邪啊
case 1 : 使用CIContext作为全局对象。渲染时一直报错。错误代码如下:
if (ciContext == nil) { kCIContextOutputColorSpace : (__bridge id)rgbColorSpace}];
EAGLContext *eaglContext = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES2];
ciContext = [CIContext contextWithEAGLContext:eaglContext options:@{kCIContextWorkingColorSpace : [NSNull null]}];
}
[ciContext render:ciImage toCVPixelBuffer:pixelBuffer bounds:cropRect colorSpace:nil];
