Sunday, July 12, 2009

Some quick cocoa notes

In documentation such as this: "Convenience Constructors" do not seem to require alloc, like so:
NSDate *now = [NSDate date];

"Initializers", on the other hand, require alloc:
NSDate *since = [[NSDate alloc] initWithTimeInterval:0 sinceDate:someOtherDate];

No comments: