home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.mac.programmer
- Path: sparky!uunet!cs.utexas.edu!sun-barr!ames!data.nas.nasa.gov!taligent!lsr.taligent.com!user
- From: lsr@taligent.com (Larry Rosenstein)
- Subject: Re: dereferencing Handles( was Re: incrementation differences/THINK C 4.0 vs. 5.0)
- Message-ID: <lsr-260892112200@lsr.taligent.com>
- Followup-To: comp.sys.mac.programmer
- Sender: usenet@taligent.com (More Bytes Than You Can Read)
- Organization: Taligent, Inc.
- References: <1992Aug24.221630.4730@Csli.Stanford.EDU> <1992Aug25.150911.19008@bnr.ca> <1992Aug25.174228.17601@natinst.com>
- Date: Wed, 26 Aug 1992 18:24:47 GMT
- Lines: 22
-
- In article <1992Aug25.174228.17601@natinst.com>, stepan@natinst.com (Stepan
- Riha) wrote:
- >
- > However a thing to be carefull about is code of the form:
- >
- > Handle h;
- >
- > *h = foo();
- >
- > where foo() causes memory to be relocated. If the LHS is evaluated first, it
- > might be incorrect once foo is called. The correct way to write this would be
-
- And you not only have to consider whether the code in foo() can relocate
- memory, but whether the call to foo() itself might relocate memory. This
- can happen if foo() is in a different segment from the caller, and that
- segment has to be brought into memory or moved. (That implies that some
- calls to foo() might not move memory, but others could.)
-
- Larry Rosenstein
- Taligent, Inc.
-
- lsr@taligent.com
-