From reading the memory management documents in the SDK, I realized that factory methods (static constructor methods) usually save the object for me and add it to the autocomplete pool?
Would that mean I don't have to save and release the object until the pool is released before I expect it? (What should be at the end of the application, for the default autostart pool in main ()?)
This question is: Cocoa Touch a question. Should [NSMutableArray array] be saved? seems to agree with that.
However, when I used the NSMutableArray arrayWithCapacity: method, I found that I needed to save the array or all my cheeks were torn.
I'm sure this is just a complete n00b-ness or a strange mistake elsewhere in the code, but if someone could explain how exactly I might have misunderstood, I would be very obliged.
Thank!
Update: thanks for the answers. I think I have it now!
source
share