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 14