C++: Add a test of direct calls to operator new / operator dedelete.

This commit is contained in:
Geoffrey White
2020-03-31 11:01:29 +01:00
parent aa49b35d2c
commit ef68bd6bf4

View File

@@ -143,3 +143,9 @@ void multidimensionalNew(int x, int y) {
auto p2 = new char[20][20];
auto p3 = new char[x][30][30];
}
void directOperatorCall() {
void *ptr;
ptr = operator new(sizeof(int));
operator delete(ptr);
}