A
AS
Hello,
consider the following statements,
int *pBuf = new int[10]; //this will allocate 10*sizeof(int) memory
delete []pBuf // this will delete all the memory allocated to pBuf
Question: How come the application knows that it has to delete memory of
pBuf for 10 * sizeof(int) from the statement "delete []pBuf "?
Pls. reply back
John
consider the following statements,
int *pBuf = new int[10]; //this will allocate 10*sizeof(int) memory
delete []pBuf // this will delete all the memory allocated to pBuf
Question: How come the application knows that it has to delete memory of
pBuf for 10 * sizeof(int) from the statement "delete []pBuf "?
Pls. reply back
John