home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / lang / cplus / 13539 < prev    next >
Encoding:
Internet Message Format  |  1992-09-11  |  1.0 KB

  1. Xref: sparky comp.lang.c++:13539 comp.std.c++:1157
  2. Path: sparky!uunet!news.centerline.com!matt
  3. From: matt@centerline.com (Matt Landau)
  4. Newsgroups: comp.lang.c++,comp.std.c++
  5. Subject: operator delete[] and NULL
  6. Date: 11 Sep 1992 18:30:55 GMT
  7. Organization: CenterLine Software, Inc.
  8. Lines: 12
  9. Message-ID: <18qokvINNvb@armory.centerline.com>
  10. NNTP-Posting-Host: 140.239.1.32
  11. Summary: Is delete[] NULL well-defined?
  12.  
  13. Speaking of operator delete[], is the effect of calling delete[] on NULL
  14. well-defined?  The ARM says plainly that "delete NULL" is legal, and a 
  15. no-op, but I couldn't find anything explicit about "delete[] NULL", nor
  16. could I find any implication that operator delete and operator delete[]
  17. must behave the same way.
  18.  
  19. The reason I ask is that, with USL cfront 2.1.12, I have found code that
  20. crashes intermittantly when asked to delete[] NULL.  I'm wondering if the
  21. code is correct and cfront is buggy, or vice versa.
  22. --
  23.  Matt Landau            Waiting for a flash of enlightenment
  24.  matt@centerline.com              in all this blood and thunder
  25.