¡@

Home 

2014/10/15 ¤U¤È 10:13:16

iphone Programming Glossary: removals

Objective C release, autorelease, and data types

http://stackoverflow.com/questions/1219575/objective-c-release-autorelease-and-data-types

them. Then I noticed something peculiar I was getting a leak on a certain array initialized like this NSMutableArray removals NSMutableArray new but not a similar one NSMutableArray removals NSMutableArray arrayWithCapacity 9 Now the reason one was.. a certain array initialized like this NSMutableArray removals NSMutableArray new but not a similar one NSMutableArray removals NSMutableArray arrayWithCapacity 9 Now the reason one was set up with new is that it could have 0 99 items in it whereas.. if I did not release at the end of the method or an exception if I did I changed the first array to NSMutableArray removals NSMutableArray arrayWithCapacity 99 and I get no leaks and don't have to release anything. Can anyone explain iphone objective..