What exactly happens when I do this...?
NSData *data = [[NSData alloc] initWithContentsOfURL:[NSURL urlWithString:@"..."]];
Does it immediately go out to the Internet, gets all the data at the URL, returns, and goes to the next line? Or does it set things up, and the data is read later when the bytes of NSData are requested? If the data is read later, is all the data read in one shot? Or is the data read in piecemeal as the app needs them?
My basic problem is that I have a very large XML file to parse. If I set up an NSData object and parse it through NSXMLParser, will the app blow up because the XML data is too large? Or does the app "do the right thing" and parses the XML as the data bytes stream in?
Thanks!