Amazon.com Widgets Session 5 / *answer = *result?
Welcome, Guest. Please login or register.
Did you miss your activation email?
July 31, 2014, 12:36:06 PM
Home Help Search chat Login Register 
News: Read this please.The Great Kangaroo Escape Looking for reviews of the 4th ed on Amazon!   Twitter:  @skochan
                     

+ Official Forum for Programming in Objective-C (the iPhone Programming Language) - Stephen Kochan
|-+ Old Stuff
| |-+ Parts 1 and 2
| | |-+ Questions and Discussion
| | | |-+ Session 5 / *answer = *result?
Pages: [1] Go Down
Print
Author Topic: Session 5 / *answer = *result? (Read 793 times)
LeSeur
Newbie
*
Posts: 4







on: June 05, 2011, 12:09:01 PM

Hi Steve,

From session 5 in the Fraction add method and Main -

How does the compiler know to store the returned result "answer" (the reference in memory) into  the Fractions *result (that reference in memory) in Main? Why would you not just label "*result" as "*answer" for clarity in Main?

Thx a million for you insight and help!

LeSueur
Logged
LeSeur
Newbie
*
Posts: 4







Reply #1 on: June 11, 2011, 05:06:17 PM

I figured it out after rereading book and viewing the session again. Only the reference is passed by the add method from "answer" to "result". That is why you only have to release result.
Logged
skochan
Administrator
Hero Member
*****
Posts: 3114







Reply #2 on: June 11, 2011, 06:02:08 PM

Sorry I didn't answer this before you figured it out!  But congrats for doing that!

Cheers,

Steve
Logged
Pages: [1] Go Up
Print
Jump to:



Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Entire forum contents (c) 2009 classroomM.com. All rights reserved.