March 2014 update

This commit is contained in:
Ingy döt Net 2014-04-02 16:56:35 +00:00
parent 09687c4926
commit a25938f123
1846 changed files with 21876 additions and 5203 deletions

View file

@ -1,5 +1,4 @@
@interface T : NSObject
{ }
- (void)identify;
@end
@ -17,7 +16,6 @@
@end
@interface S : T
{ }
@end
@implementation S
@ -29,11 +27,12 @@
int main()
{
T *original = [[S alloc] init];
T *another = [original copy];
[another identify]; // logs "I am an S"
@autoreleasepool {
[another release]; // like "alloc", the object returned by "copy" is "owned" by the caller, so we are responsible for releasing it
[original release];
T *original = [[S alloc] init];
T *another = [original copy];
[another identify]; // logs "I am an S"
}
return 0;
}