NSDate* now = [[NSDate alloc] init];
Currently learning Objective C and my book doesnt seem to do a good job of explaining this line of code. So, i'm aware that we are declaring a pointer "now" that points to an NSDate
object. The message is what seems to be confusing me.
If i'm correct, [NSDate alloc]
is allocating some memory for an instance of NSDate
, but what is init
doing?