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?
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
dealloc
is called automatically as soon as retain count reaches to 0.