F
Fred Zwarts
Hello,
I am trying to debug some complex debug code.
In order to track the use of dynamically allocated memory,
I replaced the standard global new and delete operators.
(Not for changing the memory allocation algorithm, but
for gathering some statistics and to find memory leaks.)
This seems to work.
However, I noticed that my replacing delete operator is not called
in the case that an attempt is made to create an object of a class
using the new operator and an exception is thrown in the constructor.
My question is how the memory which was allocated for this object is
deallocated. Apparently the global delete operator is not used.
Cheers,
F.Z.
I am trying to debug some complex debug code.
In order to track the use of dynamically allocated memory,
I replaced the standard global new and delete operators.
(Not for changing the memory allocation algorithm, but
for gathering some statistics and to find memory leaks.)
This seems to work.
However, I noticed that my replacing delete operator is not called
in the case that an attempt is made to create an object of a class
using the new operator and an exception is thrown in the constructor.
My question is how the memory which was allocated for this object is
deallocated. Apparently the global delete operator is not used.
Cheers,
F.Z.