Connecting Tech Pros Worldwide Help | Site Map

delete NULL, what about delete[] NULL

  #1  
Old July 22nd, 2005, 06:59 PM
Mathieu Malaterre
Guest
 
Posts: n/a
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

  #2  
Old July 22nd, 2005, 06:59 PM
Andrey Tarasevich
Guest
 
Posts: n/a

re: delete NULL, what about delete[] NULL


Mathieu Malaterre wrote:[color=blue]
> ...
> 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[]...
> ...[/color]

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

--
Best regards,
Andrey Tarasevich
  #3  
Old July 22nd, 2005, 06:59 PM
Mathieu Malaterre
Guest
 
Posts: n/a

re: delete NULL, what about delete[] NULL


Andrey Tarasevich wrote:[color=blue]
> Mathieu Malaterre wrote:
>[color=green]
>>...
>> 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[]...
>>...[/color]
>
>
> 5.3.5/2 states that for both forms of 'delete'.[/color]

Excellent thanks, thus xlC has a bug (at least the version I am using).

Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
deleting a null pointer ma740988 answers 6 July 29th, 2008 07:25 PM
Particular Example about why should we not use GOTO SoftEast answers 17 April 1st, 2007 10:35 AM
Warning : Possible use of null pointer HP answers 26 October 5th, 2005 05:25 PM
Question about delete/new pedicini answers 4 July 22nd, 2005 09:25 PM