NSUrl: Which method to use
NSUrl: Which method to use
- Subject: NSUrl: Which method to use
- From: "M.S. Hrishikesh" <email@hidden>
- Date: Sat, 27 Jun 2009 17:54:16 +0530
To create an NSUrl from a file which would be the preferred way
NSString *myFile = @"myFile.xml";
Method A:
NSUrl *myUrl = [NSUrl fileURLWithPath:myFile]
Method B:
NSUrl *myURL = [[NSUrl alloc] initFileURLWithPath:myFile];
Using method B I would need to release my object at some point (this is
for iPhone so no GC). Using Method A means no need to release. But with
MethodA the object is probably gone as soon as I exit the method correct?
Thanks
Hrishi
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden