S
SpreadTooThin
I understand that if you allocate an array using new as follows
object * b = new object[n];
then you must free the object as follows:
delete [] b;
however if you are allocating a char buffer as follows:
char * b = new char [n];
then isn't it irrelavant if you use
delete b or delete [] b ?
(Then only thing I can think of is that if you change the object type
from char to some other object then you might have some issues...)
object * b = new object[n];
then you must free the object as follows:
delete [] b;
however if you are allocating a char buffer as follows:
char * b = new char [n];
then isn't it irrelavant if you use
delete b or delete [] b ?
(Then only thing I can think of is that if you change the object type
from char to some other object then you might have some issues...)