Thanks a lot for all your answers, they are helping me a lot for sure!!!
On another note, I'm reading about the Autorelease pool. Did I understand this correctly?
Code:
-(void)myFunc
{
NSAutoreleasePool * myOwnPool = [[NSAutoreleasePool alloc] init];
Obj o1 = [[Obj alloc] init];
Obj o2 = [[Obj alloc] init];
Obj o3 = [[Obj alloc] init];
[whateverOtherObject setObj:o1]; //obj/setObj property set to retain
[whateverObject setObj:o2 andObj:o3]; //obj/setObj property set to retain
[myOwnPool release];
}
Would this automatically release o1, o2, o3 and still keep the memory allocated for "whateverOtherObject" and "whateverObject"?
Thanks!