I am just getting started with cocoa. So please excuse the silly question, but I can't quite wrap my head around some aspects of memory management yet.
In the interface of my class I am declaring an object as CEMyObjectclass *myObject;
. I do not alloc or init the obect in the classe's init menthod. But I do have a method that calls myObject = [[CEMyObjectclass alloc] initWithImage:someImage];
. Will that eventually run out of memory or does myObject
just get overwritten by a new instance every time that method is called?
Thanks!