delete NULL, what about delete[] NULL

Discussion in 'C++' started by Mathieu Malaterre, Aug 17, 2004.

  1. Hello,

    I could find in the C++ definition that:

    delete NULL (delete 0) is perfectly valid. But I couldn't find the same
    thing for delete[]...

    Thanks
    Mathieu
    Mathieu Malaterre, Aug 17, 2004
    #1
    1. Advertising

  2. Mathieu Malaterre wrote:
    > ...
    > I could find in the C++ definition that:
    >
    > delete NULL (delete 0) is perfectly valid. But I couldn't find the same
    > thing for delete[]...
    > ...


    5.3.5/2 states that for both forms of 'delete'.

    --
    Best regards,
    Andrey Tarasevich
    Andrey Tarasevich, Aug 17, 2004
    #2
    1. Advertising

  3. Andrey Tarasevich wrote:
    > Mathieu Malaterre wrote:
    >
    >>...
    >> I could find in the C++ definition that:
    >>
    >>delete NULL (delete 0) is perfectly valid. But I couldn't find the same
    >>thing for delete[]...
    >>...

    >
    >
    > 5.3.5/2 states that for both forms of 'delete'.


    Excellent thanks, thus xlC has a bug (at least the version I am using).
    Mathieu Malaterre, Aug 17, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Kivak Wolf
    Replies:
    2
    Views:
    10,066
    Kivak Wolf
    Jun 28, 2005
  2. vizlab
    Replies:
    3
    Views:
    4,201
    Michael Bar-Sinai
    Oct 17, 2007
  3. Replies:
    16
    Views:
    7,328
    Mike Schilling
    Oct 12, 2005
  4. Replies:
    5
    Views:
    26,628
    Mike Schilling
    Mar 29, 2006
  5. Bo Peng
    Replies:
    13
    Views:
    13,305
    Siemel Naran
    Jul 18, 2004
Loading...

Share This Page