Is this a memory leak?
Posted
by Ben
on Stack Overflow
See other posts from Stack Overflow
or by Ben
Published on 2010-05-17T21:17:59Z
Indexed on
2010/05/17
21:20 UTC
Read the original article
Hit count: 420
char *pointer1;
char *pointer2;
pointer1 = new char[256];
pointer2 = pointer1;
delete [] pointer1;
In other words, do I have to do delete [] pointer2
as well?
Thanks!
© Stack Overflow or respective owner