Does the iPhone support garbage collection? If it does, then what are the alternate ways to perform the operations that are performaed using +alloc
and -init
combination:
NSXMLParser *xmlParser = [[NSXMLParser alloc] initWithData:xmlData];
UIImage *originalImage = [[UIImage alloc] initWithData:data];
detailViewController = [[[DetailViewController alloc] initWithNibName:@"DetailView bundle:[NSBundle mainBundle]] autorelease];
... and other commands. Thank you in advance for any help or direction that you can provide.
See Question&Answers more detail:os