susitha susitha - 2 months ago 6x
iOS Question

NSMutableArray alloc init vs NSMutableArray array

What is the differece between:

[[NSMutableArray alloc] init]


[NSMutableArray array]


Here in [NSMutableArray array] you don't have to release array it will be released automatically. & if you will write [NSMutableArray alloc] init] you will have to release array so [[NSMutableArray array] will be equivalent to [[[NSArray alloc] init] autorelease];