Possible Duplicate:
alloc and init what do they actually do
we do code like [[className alloc] init],so what actually happens in alloc and what happens in init,my understanding is that alloc will create instance of that class and allocate chunk of memory for that instance,then what is use of init?
thanks in advance.
alloc: it allocates the memory for the object you create, increasing the retain count
init: it initializes the object, that you created, with custom values and properties if you provide them, else with default values and properties