njn | 5cebf57 | 2003-10-09 15:40:38 +0000 | [diff] [blame] | 1 | #include <new> |
2 | |||||
3 | // At one point, Valgrind wasn't overriding these 'nothrow' versions; since | ||||
4 | // they call malloc(), the calls to 'delete' caused bogus mismatch errors. | ||||
5 | |||||
6 | int main() | ||||
7 | { | ||||
8 | int * a = new (std::nothrow) int; | ||||
9 | int * b = new (std::nothrow) int[5]; | ||||
10 | delete a; | ||||
11 | delete [] b; | ||||
12 | } | ||||
13 |