I'm doing a set method:
OBS: somobject is an attribute of a class.
– (void)setSomeObject:(SomeObject *)newSomeobject { [someobject autorelease]; someobject = [newSomeobject retain]; return; }
on [somobject autorelease] I declare that I don't want more to own the object under the scope of setSomeObject.
Does the "someobject" retained by another object will be released? Or the object will be released just on setSomeObject method?
If the someobject class atribute already exists?
What will be the behavior of this object?