help-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Are delete and delete[] equivalent?


From: Thomas Maeder
Subject: Re: Are delete and delete[] equivalent?
Date: Mon, 10 Apr 2006 22:22:37 +0200
User-agent: Gnus/5.1006 (Gnus v5.10.6) XEmacs/21.4 (Jumbo Shrimp, linux)

"Aj" <aj.lavin@gmail.com> writes:

> I took over some old code and found it riddled with errors. "delete"
> is used wherever "delete[]" is needed. Some of this code is
> definitely hit several times while the code runs.
>
> My question: are delete and delete[] equivalent under g++ 3.2.2 when -g
> is used and no -O?

The language defines them to not be equivalent, so: no.


> If not, I will wonder why this code ever worked at all. :-)

Bad luck.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]