home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / lang / cplus / 12365 < prev    next >
Encoding:
Internet Message Format  |  1992-08-14  |  1.3 KB

  1. Path: sparky!uunet!usc!elroy.jpl.nasa.gov!swrinde!mips!mips!munnari.oz.au!metro!extro.ucc.su.OZ.AU!maxtal
  2. From: maxtal@extro.ucc.su.OZ.AU (John MAX Skaller)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: destruction of temporaries
  5. Message-ID: <1992Aug14.233026.7827@ucc.su.OZ.AU>
  6. Date: 14 Aug 92 23:30:26 GMT
  7. References: <46140@sunquest.UUCP> <rmartin.713716434@thor>
  8. Sender: news@ucc.su.OZ.AU
  9. Organization: MAXTAL P/L C/- University Computing Centre, Sydney
  10. Lines: 19
  11. Nntp-Posting-Host: extro.ucc.su.oz.au
  12.  
  13. In article <rmartin.713716434@thor> rmartin@thor.Rational.COM (Bob Martin) writes:
  14. >
  15. >Whenever you provide a regular copy constructor, you are granting
  16. >permission to the compiler to make temporaries.  This must be a
  17. >conscious choice, and must be supported by construction and
  18. >destruction semantics which are valid in any context.
  19. >
  20.  
  21.     Obvious but I'd never thought of it this way before.
  22. Interestingly my originating post on GC was stimulated by the idea
  23. that the lifetime of temporaries problem can be solved by garbage
  24. collecting them. Then they last as long as necessary.
  25.  
  26.  
  27. -- 
  28. ;----------------------------------------------------------------------
  29.         JOHN (MAX) SKALLER,         maxtal@extro.ucc.su.oz.au
  30.     Maxtal Pty Ltd, 6 MacKay St ASHFIELD, NSW 2131, AUSTRALIA
  31. ;--------------- SCIENTIFIC AND ENGINEERING SOFTWARE ------------------
  32.