Abraxas/Meyers: Effective C++ Home Table of Contents
void m16()
Function Name: m16()
{int *nArray = new int[20];int *nArray1 = new int[20];int *pInt = new int;int *pInt1 = new int;delete[] nArray; // gooddelete pInt; // gooddelete nArray1; // baddelete[] pInt; // bad
}
Function Name: foo()
void foo() {const int x = 63;//new (int(*p)) int; // new-placement expression
new (int(*[x])); // new type-id
delete x;
}
Abraxas/Meyers: Effective C++ Home Table of Contents