I am going through Chapter 17 and watching the inheritance webcast and have a question.
Is the following:
Fraction *myFrac = [[Fraction alloc] init];
Fraction *myFrac2;
[myFrac setTo:1 over: 8];
myFrac = myFrac2; //These reference the same place in memory.
equivalent to a returned Fraction? For example if a Fraction called answer from the Fraction add method is returned to result which is not allocated and initialized.
Since setting myFrac = myFrac2 does not increase the reference count a release of myFrac2 would release myFrac. I think this is the same for a returned Fraction I am just making sure.
Thanks,
Jon