I have a loop cycle method for CAEAGLLayer that uses a GCD to serialize access to shared ivars.
Currently, my drawing code is constructed as follows:
- (void)draw {
dispatch_sync(serialDrawingQueue, ^{
@autoreleasepool {
[self drawingStart];
[spriteA draw];
[spriteB draw];
[self drawingEnd];
}
});
}
The method drawis called by CADisplayLink. Is it required @autoreleasepoolwhen I use GCD blocks?
source
share