I am following tutorials who do:
Class *Object = [ [ Class alloc] init];
-some code-
[object release];
But I've seen:
Class *Object = [[Class new] autorelease];
What's the dfference?
Is one better than the other?
Should I continue with the alloc init or change to new autorelease?
Class *Object = [ [ Class alloc] init];
-some code-
[object release];
But I've seen:
Class *Object = [[Class new] autorelease];
What's the dfference?
Is one better than the other?
Should I continue with the alloc init or change to new autorelease?