1
0
mirror of https://github.com/ioacademy-jikim/debugging synced 2025-06-08 16:36:21 +00:00
2015-12-13 22:34:58 +09:00

14 lines
298 B
C++

#include <new>
// At one point, Valgrind wasn't overriding these 'nothrow' versions; since
// they call malloc(), the calls to 'delete' caused bogus mismatch errors.
int main()
{
int * a = new (std::nothrow) int;
int * b = new (std::nothrow) int[5];
delete a;
delete [] b;
}