Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > delete NULL, what about delete[] NULL

Reply
Thread Tools

delete NULL, what about delete[] NULL

 
 
Mathieu Malaterre
Guest
Posts: n/a
 
      08-17-2004
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

 
Reply With Quote
 
 
 
 
Andrey Tarasevich
Guest
Posts: n/a
 
      08-17-2004
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
 
Reply With Quote
 
 
 
 
Mathieu Malaterre
Guest
Posts: n/a
 
      08-17-2004
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).

 
Reply With Quote
 
 
 
Reply

Thread Tools

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
createImage sometime returns null and sometime returns non-null. vizlab Java 3 10-17-2007 11:21 AM
"stringObj == null" vs "stringObj.equals(null)", for null check?? qazmlp1209@rediffmail.com Java 5 03-29-2006 10:37 PM
difference between null object and null string gokul.b@gmail.com Java 16 10-12-2005 06:43 PM
VB.NET Null to SQL Null (ASP.NET 2.0 GridView) Kivak Wolf ASP .Net 2 06-28-2005 02:01 PM
Is there a null ostream (like /dev/null) in cpp? Bo Peng C++ 13 07-18-2004 07:17 PM



Advertisments