Created
December 5, 2016 12:57
-
-
Save mkramskoy/f94755191b758fe430b3a777ea07932d to your computer and use it in GitHub Desktop.
objectAtIndex: begaviour
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TestObject *objectToAdd = [TestObject new]; | |
NSMutableArray *array = [NSMutableArray new]; | |
[array addObject:objectToAdd]; | |
[objectToAdd release]; | |
objectToAdd = nil; | |
TestObject *object = [array objectAtIndex:0]; | |
[array release]; | |
NSLog(@"%@", object); //crash |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment