I have an NSDate
object created by
NSDate *date = [[NSDate alloc] init];
Later, I want to reset the date to the "now", so I thought that
[date init];
or
date = [date init];
might do the job, but they don't. Instead,
[date release];
date = [[NSDate alloc] init];
works. I'm a bit confused about this, since in the documentation for - (id) init
, it says:
Returns an NSDate object initialized to the current date and time.
and since date
is already allocated, shouldn't it just need an init
message?