If I have a function like this
void setSomeObject( SomeObjectClass obj /*, and some other params*/ )
{
[_previous autorelease];
_previous = obj;
}
As far as I understood it the autorelease message is sent to the object itself (not _previous) so at one point, sometime when setSomeObject goes out of scope the original object is autoreleased (if any). Is this correct? I am not using properties but I guess by using them the release of the previous object would be automatic when I do self.previous = obj; ?