Quote:
Originally Posted by ckcheng
To properly create a property with code (that is, not a UI control from Interface Builder) in "init" method, *always* retain your property.
myNSMutableArray = [[NSMutableArray alloc] initWith....];
should be
myNSMutableArray = [[[NSMutableArray alloc] initWith....] retain];
|
This is totally incorrect, alloc automatically retains as do methods with new or copy in them. The connivence class methods return a retained and autoreleased item and need to be retained it need be.