changed set_new_handler to std::ser_new_handler

This commit is contained in:
Pavol Marko 2004-05-03 20:00:41 +00:00
parent 5ce096457a
commit e2ff797de4

View File

@ -638,12 +638,6 @@ void m_setOwner(const char *file, const unsigned int line, const char *func)
// memory tracking routines. // memory tracking routines.
// --------------------------------------------------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------------------------------------------------
// PM: This isn't defined for any reason
new_handler set_new_handler(new_handler x)
{
return NULL;
}
void *operator new(size_t reportedSize) void *operator new(size_t reportedSize)
{ {
#ifdef TEST_MEMORY_MANAGER #ifdef TEST_MEMORY_MANAGER
@ -672,8 +666,8 @@ void *operator new(size_t reportedSize)
// There isn't a way to determine the new handler, except through setting it. So we'll just set it to NULL, then // There isn't a way to determine the new handler, except through setting it. So we'll just set it to NULL, then
// set it back again. // set it back again.
new_handler nh = set_new_handler(0); std::new_handler nh = std::set_new_handler(0);
set_new_handler(nh); std::set_new_handler(nh);
// If there is an error handler, call it // If there is an error handler, call it
@ -724,8 +718,8 @@ void *operator new[](size_t reportedSize)
// There isn't a way to determine the new handler, except through setting it. So we'll just set it to NULL, then // There isn't a way to determine the new handler, except through setting it. So we'll just set it to NULL, then
// set it back again. // set it back again.
new_handler nh = set_new_handler(0); std::new_handler nh = std::set_new_handler(0);
set_new_handler(nh); std::set_new_handler(nh);
// If there is an error handler, call it // If there is an error handler, call it
@ -782,8 +776,8 @@ void *operator new(size_t reportedSize, const char *sourceFile, int sourceLine)
// There isn't a way to determine the new handler, except through setting it. So we'll just set it to NULL, then // There isn't a way to determine the new handler, except through setting it. So we'll just set it to NULL, then
// set it back again. // set it back again.
new_handler nh = set_new_handler(0); std::new_handler nh = std::set_new_handler(0);
set_new_handler(nh); std::set_new_handler(nh);
// If there is an error handler, call it // If there is an error handler, call it
@ -834,8 +828,8 @@ void *operator new[](size_t reportedSize, const char *sourceFile, int sourceLine
// There isn't a way to determine the new handler, except through setting it. So we'll just set it to NULL, then // There isn't a way to determine the new handler, except through setting it. So we'll just set it to NULL, then
// set it back again. // set it back again.
new_handler nh = set_new_handler(0); std::new_handler nh = std::set_new_handler(0);
set_new_handler(nh); std::set_new_handler(nh);
// If there is an error handler, call it // If there is an error handler, call it