home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / sys / mac / programm / 21282 < prev    next >
Encoding:
Internet Message Format  |  1993-01-12  |  1.2 KB

  1. Path: sparky!uunet!gatech!rpi!zaphod.mps.ohio-state.edu!rphroy!link.ph.gmr.com!rrichter
  2. From: rrichter@link.ph.gmr.com (Roy Richter PH/32)
  3. Newsgroups: comp.sys.mac.programmer
  4. Subject: Re: TCL: Bizzare Behavior Time
  5. Message-ID: <96325@rphroy.ph.gmr.com>
  6. Date: 12 Jan 93 14:05:30 GMT
  7. References: <1993Jan11.170231.17969@fsl.noaa.gov> <1993Jan11.220137.26434@kth.se>
  8. Sender: news@rphroy.ph.gmr.com
  9. Organization: GM Research
  10. Lines: 22
  11. Nntp-Posting-Host: link.ph.gmr.com
  12.  
  13. In article <1993Jan11.220137.26434@kth.se>, d88-jwa@byse.nada.kth.se (Jon Wtte) writes:
  14. |> The call to new is risky unless you have locked the
  15. |> object doing the call; try an intermediate temp variable:
  16. |> 
  17. |> CFoo :: DoFoo ( )
  18. |> {
  19. |>     CBar * aBar = new CBar ;
  20. |> 
  21. |>     theBar = aBar ;
  22. |> }
  23.  
  24. Do I have to be this nutso careful when dealing with TCL Objects?
  25. And, does coding it like this protect me -- that is, is "theBar"
  26. have a correct reference after the call to "new".  If so, when does that
  27. refence get corrected?  If
  28.  
  29.     theBar = new CBar;
  30.  
  31. is potentially bad, maybe that should be somewhere in the docs.
  32. --
  33. Roy Richter                  Internet: rrichter@ph.gmr.com
  34. Physics Dept, GM Research    UUCP:     rphroy!rrichter
  35.