Connecting Tech Pros Worldwide Help | Site Map

delete NULL, what about delete[] NULL

Mathieu Malaterre
Guest
 
Posts: n/a
#1: Jul 22 '05
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

Andrey Tarasevich
Guest
 
Posts: n/a
#2: Jul 22 '05

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
Mathieu Malaterre
Guest
 
Posts: n/a
#3: Jul 22 '05

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