home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!psinntp!ncrlnk!ncr-mpd!Eric.Price
- From: Eric.Price@FtCollins.NCR.com (Eric.Price)
- Newsgroups: comp.lang.c++
- Subject: Re: error in Stroustrup text (?)
- Message-ID: <ERIC.PRICE.92Aug12125825@sousa.FtCollins.NCR.com>
- Date: 12 Aug 92 11:58:25 GMT
- References: <46960007@hpscit.sc.hp.com>
- Sender: uucp@ncr-mpd.FtCollins.NCR.COM
- Reply-To: Eric.Price@FtCollinsCO.NCR.com
- Organization: NCR Microelectronics, Ft. Collins, CO
- Lines: 21
- In-reply-to: weeks@hpscit.sc.hp.com's message of 11 Aug 92 19:00:10 GMT
-
- >>>>> On 11 Aug 92 19:00:10 GMT, weeks@hpscit.sc.hp.com (Greg Weeks) said:
-
- Greg> Someone please correct me if I'm mistaken, but the following text from pg
- Greg> 216 of Stroustrup's 2nd edition C++ text seems to be wrong:
-
- Greg> If you want to supply an allocator/dealocator pair that works correctly
- Greg> for derived classes, you must either supply a virtual destructor in the
- Greg> base class or refrain from using the size_t argument in the
- Greg> deallocator.
-
- I suspect Dr Stroustrup's unstated assumption is that a deallocator
- which does not use the size_t argument accesses the size of the
- allocated memory from a location where the allocator has secretly
- squirreled it away.
-
- -Eric
- --
- Eric Price, Software Architect, Computer Aided Design
- NCR Microelectronic Products Division
- 2001 Danfield Court; Ft. Collins, CO 80525
- (303) 223-5100 x471; FAX: 226-9556; EMAIL: Eric.Price@FtCollinsCO.NCR.COM
-