1.
Now with ARC, how would a simple little program like this look like with ARC?:
#import <Foundation/Foundation.h>
#import "FakeClass.h"
int main(int argc, const char* argv[])
{
NSAutoreleasePool *pool = [ [NSAutoreleasePool alloc] init];
FakeClass *object = [ [FakeClass alloc] init];
//do some stuff
[object release];
[pool drain];
return 0;
}
2.
NSString *d = @"Dont feed grapes to dogs!";
NSRange range = [d rangeOfString:@"grapes"];
why is the NSString object a pointer but not the NSRange object?