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

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