I asked a dumb question the other day (dumb question) about the difference between:
// line1
NSMutableData* myData = [NSMutableData data];
// line2
NSMutableData* myData = [[NSMutableData alloc] init];
It was a dumb question and I didn't catch my mistake in time. What I meant to ask is, what is the difference between:
// line1 -- added retain
NSMutableData* myData = [[NSMutableData data] retain]; // added retain
// line2
NSMutableData* myData = [[NSMutableData alloc] init];
This could easily still be a dumb question... apologies if that is the case! Is there a real difference? With ARC? I have seen NSXMLParser examples use both methods (some of the Apple examples use [[[NSMutableData alloc] init] autorelease]) and I'm not clear if there is really a difference?