home *** CD-ROM | disk | FTP | other *** search
- 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
- From: ark@alice.att.com (Andrew Koenig)
- Newsgroups: comp.lang.c++
- Subject: Re: Renew?
- Message-ID: <23347@alice.att.com>
- Date: 29 Jul 92 14:30:17 GMT
- Article-I.D.: alice.23347
- References: <memo.547224@cix.compulink.co.uk>
- Reply-To: ark@alice.UUCP ()
- Organization: AT&T Bell Laboratories, Liberty Corner NJ
- Lines: 15
-
- In article <memo.547224@cix.compulink.co.uk> vadim@cix.compulink.co.uk writes:
-
- > I agree, that a pointer to original object stored somewhere
- > else creates a dangerous situation, but this is still true even if the
- > 'operator renew' was built-in in the language. Renew and realloc should
- > be always used with caution.
-
- If renew guarantees to the user that the copy constructor and
- destructor will be called for each object moved, that greatly
- ameliorates the situation. It is then sufficient for the user to
- get those two functions right, or make them private (which would
- prohibit renew on objects of that class).
- --
- --Andrew Koenig
- ark@europa.att.com
-