home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / lang / cplus / 11719 < prev    next >
Encoding:
Internet Message Format  |  1992-07-29  |  1.1 KB

  1. Path: sparky!uunet!cs.utexas.edu!sdd.hp.com!wupost!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!att!allegra!alice!ark
  2. From: ark@alice.att.com (Andrew Koenig)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Renew?
  5. Message-ID: <23347@alice.att.com>
  6. Date: 29 Jul 92 14:30:17 GMT
  7. Article-I.D.: alice.23347
  8. References: <memo.547224@cix.compulink.co.uk>
  9. Reply-To: ark@alice.UUCP ()
  10. Organization: AT&T Bell Laboratories, Liberty Corner NJ
  11. Lines: 15
  12.  
  13. In article <memo.547224@cix.compulink.co.uk> vadim@cix.compulink.co.uk writes:
  14.  
  15. > I  agree, that a pointer to original object stored somewhere
  16. > else creates a dangerous situation, but this is still true even if the
  17. > 'operator renew' was built-in in the language. Renew and realloc should
  18. > be always used with caution.  
  19.  
  20. If renew guarantees to the user that the copy constructor and
  21. destructor will be called for each object moved, that greatly
  22. ameliorates the situation.  It is then sufficient for the user to
  23. get those two functions right, or make them private (which would
  24. prohibit renew on objects of that class).
  25. -- 
  26.                 --Andrew Koenig
  27.                   ark@europa.att.com
  28.