Connecting Tech Pros Worldwide Help | Site Map

delete NULL, what about delete[] NULL

 
LinkBack Thread Tools Search this Thread
  #1  
Old July 22nd, 2005, 05:59 PM
Mathieu Malaterre
Guest
 
Posts: n/a
Default delete NULL, what about delete[] NULL

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, 05:59 PM
Andrey Tarasevich
Guest
 
Posts: n/a
Default 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, 05:59 PM
Mathieu Malaterre
Guest
 
Posts: n/a
Default 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).

 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,662 network members.