I have a run loop method for a CAEAGLLayer which uses GCD for serializing access to shared ivars.
My drawing code currently is constructed like this:
- (void)draw {
dispatch_sync(serialDrawingQueue, ^{
@autoreleasepool {
[self drawingStart];
[spriteA draw];
[spriteB draw];
[self drawingEnd];
}
});
}
The draw method is called by a CADisplayLink.
Is the @autoreleasepool necessary when I use GCD blocks?
From the Apple docs: