I know that alloc and retain will increase the reference count of an object. Is there any other different method that actually increment the reference count? And when/how does dealloc is called?
I know that alloc and retain will increase the reference count of an object.
Share
With these the retain count gets increased.
new, however it can be seen as alloc+init.
retain
copy creates new object with retain count=1
mutableCopy creates new object with retain count=1
deallocis called automatically as soon as retain count reaches to 0.