susitha susitha - 1 year ago 140
iOS Question

NSMutableArray alloc init vs NSMutableArray array

What is the differece between:

[[NSMutableArray alloc] init]


[NSMutableArray array]

Answer Source

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];

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download