Is @autoreleasepool{
//code for main.m here, except no release or drain statements
The same as the books code using this?
NSAutoreleasePool *pool = [[NSAutoreleastPool alloc init]];
//main.m code with the release and drain statements

Is it the same as c#'s using{} statement?


@autoreleasepool { ... code ... }

is mostly equivalent to

NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
.... code ....
[pool drain];

I’m not familiar with C# enough to say for sure, but my small amount of research leads me to believe they are similar.