Objective-C

Autorelease poolを見栄えよく使うマクロ

Objective-C + C99限定なんだけど #define pool for (NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; pool; [pool drain], pool = 0) とかって定義しておくと void foo() { pool { NSObject *obj = [[MyObject alloc] init]; [obj autoreleas…