Is delete dangerous, when delete[] is appropriate?
Home
FAQ
Contact
Sign in
Search
comp.lang.c++.moderated only
Advanced search
POPULAR GROUPS
perl.cpan.testers
alt.bestjobsusa.computer
alt.bestjobsusa.computer.jobs
us.jobs
us.jobs.offered
alt.bestjobsusa.jobs.offered
news.admin.netabuse.sightings
alt.politics
it.politica
alt.fan.rushlimbaugh
more...
Up
Is delete dangerous, when delete[] is appropriate?
Group:
comp.lang.c++.moderated
·
Group Profile
Author:
ted
ted
Date:
Jul 10, 2007 04:36
If I use delete, when delete[] is correct, can the consequence be
anything
worse than a memory leak?
E.g.
int* pi = new int[2];
delete pi; // delete[] is correct
(Obviously, let's assume the rest of the program doesn't contain any
errors.)
--
[ See
http://www.gotw.ca/resources/clcm.htm
for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
27
Comments
diggit!
del.icio.us!
reddit!