diff --git a/code/nel/src/misc/aabbox.cpp b/code/nel/src/misc/aabbox.cpp index 6e1a9e428..3636552d1 100644 --- a/code/nel/src/misc/aabbox.cpp +++ b/code/nel/src/misc/aabbox.cpp @@ -21,6 +21,10 @@ #include "nel/misc/bsphere.h" #include "nel/misc/matrix.h" +#ifdef DEBUG_NEW + #define new DEBUG_NEW +#endif + namespace NLMISC { diff --git a/code/nel/src/misc/algo.cpp b/code/nel/src/misc/algo.cpp index 71fd14347..6a3ef62dd 100644 --- a/code/nel/src/misc/algo.cpp +++ b/code/nel/src/misc/algo.cpp @@ -21,6 +21,9 @@ using namespace std; +#ifdef DEBUG_NEW + #define new DEBUG_NEW +#endif namespace NLMISC { diff --git a/code/nel/src/misc/async_file_manager.cpp b/code/nel/src/misc/async_file_manager.cpp index b9be77f45..366237722 100644 --- a/code/nel/src/misc/async_file_manager.cpp +++ b/code/nel/src/misc/async_file_manager.cpp @@ -23,6 +23,10 @@ using namespace std; +#ifdef DEBUG_NEW + #define new DEBUG_NEW +#endif + namespace NLMISC { diff --git a/code/nel/src/misc/big_file.cpp b/code/nel/src/misc/big_file.cpp index e2d64d052..f5ee067f4 100644 --- a/code/nel/src/misc/big_file.cpp +++ b/code/nel/src/misc/big_file.cpp @@ -22,6 +22,9 @@ using namespace std; using namespace NLMISC; +#ifdef DEBUG_NEW + #define new DEBUG_NEW +#endif namespace NLMISC { diff --git a/code/nel/src/misc/bit_mem_stream.cpp b/code/nel/src/misc/bit_mem_stream.cpp index c8ae37163..ed282786e 100644 --- a/code/nel/src/misc/bit_mem_stream.cpp +++ b/code/nel/src/misc/bit_mem_stream.cpp @@ -25,6 +25,9 @@ using namespace std; +#ifdef DEBUG_NEW + #define new DEBUG_NEW +#endif namespace NLMISC { diff --git a/code/nel/src/misc/bit_set.cpp b/code/nel/src/misc/bit_set.cpp index c19b8d35d..79eda0c13 100644 --- a/code/nel/src/misc/bit_set.cpp +++ b/code/nel/src/misc/bit_set.cpp @@ -20,6 +20,9 @@ using namespace std; +#ifdef DEBUG_NEW + #define new DEBUG_NEW +#endif namespace NLMISC { diff --git a/code/nel/src/misc/bitmap_jpeg.cpp b/code/nel/src/misc/bitmap_jpeg.cpp index cae1f9700..799d659d6 100644 --- a/code/nel/src/misc/bitmap_jpeg.cpp +++ b/code/nel/src/misc/bitmap_jpeg.cpp @@ -32,6 +32,9 @@ extern "C" using namespace std; +#ifdef DEBUG_NEW + #define new DEBUG_NEW +#endif namespace NLMISC { diff --git a/code/nel/src/misc/bitmap_png.cpp b/code/nel/src/misc/bitmap_png.cpp index 768619e76..cea0b7d0c 100644 --- a/code/nel/src/misc/bitmap_png.cpp +++ b/code/nel/src/misc/bitmap_png.cpp @@ -27,6 +27,9 @@ using namespace std; +#ifdef DEBUG_NEW + #define new DEBUG_NEW +#endif namespace NLMISC { diff --git a/code/nel/src/misc/block_memory.cpp b/code/nel/src/misc/block_memory.cpp index d6abdffe6..d7c8e445c 100644 --- a/code/nel/src/misc/block_memory.cpp +++ b/code/nel/src/misc/block_memory.cpp @@ -21,6 +21,9 @@ // remove stupid VC6 warnings void foo_block_memory_cpp() {} +#ifdef DEBUG_NEW + #define new DEBUG_NEW +#endif namespace NLMISC { diff --git a/code/nel/src/misc/bsphere.cpp b/code/nel/src/misc/bsphere.cpp index 8e3494514..1fcf359e7 100644 --- a/code/nel/src/misc/bsphere.cpp +++ b/code/nel/src/misc/bsphere.cpp @@ -21,6 +21,9 @@ using namespace NLMISC; using namespace std; +#ifdef DEBUG_NEW + #define new DEBUG_NEW +#endif namespace NLMISC { diff --git a/code/nel/src/misc/buf_fifo.cpp b/code/nel/src/misc/buf_fifo.cpp index 2f39bd098..6c377f078 100644 --- a/code/nel/src/misc/buf_fifo.cpp +++ b/code/nel/src/misc/buf_fifo.cpp @@ -26,6 +26,10 @@ using namespace std; // if 0, don't stat the time of different function #define STAT_FIFO 1 +#ifdef DEBUG_NEW + #define new DEBUG_NEW +#endif + namespace NLMISC { #ifdef BUFFIFO_TRACK_ALL_BUFFERS diff --git a/code/nel/src/misc/class_id.cpp b/code/nel/src/misc/class_id.cpp index e705c26a8..72d9cc43b 100644 --- a/code/nel/src/misc/class_id.cpp +++ b/code/nel/src/misc/class_id.cpp @@ -20,6 +20,9 @@ +#ifdef DEBUG_NEW + #define new DEBUG_NEW +#endif namespace NLMISC { diff --git a/code/nel/src/misc/cmd_args.cpp b/code/nel/src/misc/cmd_args.cpp index c42473027..2ef32a6c9 100644 --- a/code/nel/src/misc/cmd_args.cpp +++ b/code/nel/src/misc/cmd_args.cpp @@ -24,6 +24,10 @@ #include "nel/misc/cmd_args.h" +#ifdef DEBUG_NEW + #define new DEBUG_NEW +#endif + namespace NLMISC { diff --git a/code/nel/src/misc/command.cpp b/code/nel/src/misc/command.cpp index 1fff9627b..30e3defe2 100644 --- a/code/nel/src/misc/command.cpp +++ b/code/nel/src/misc/command.cpp @@ -22,6 +22,10 @@ using namespace std; using namespace NLMISC; +#ifdef DEBUG_NEW + #define new DEBUG_NEW +#endif + namespace NLMISC { //ICommand::TCategorySet* ICommand::_Categories; diff --git a/code/nel/src/misc/di_event_emitter.cpp b/code/nel/src/misc/di_event_emitter.cpp index c0894e381..8f41f6453 100644 --- a/code/nel/src/misc/di_event_emitter.cpp +++ b/code/nel/src/misc/di_event_emitter.cpp @@ -28,7 +28,9 @@ #ifdef NL_OS_WINDOWS - +#ifdef DEBUG_NEW + #define new DEBUG_NEW +#endif namespace NLMISC { diff --git a/code/nel/src/misc/di_game_device.cpp b/code/nel/src/misc/di_game_device.cpp index 22a9d57fd..6574b5cde 100644 --- a/code/nel/src/misc/di_game_device.cpp +++ b/code/nel/src/misc/di_game_device.cpp @@ -21,6 +21,10 @@ #ifdef NL_OS_WINDOWS +#ifdef DEBUG_NEW + #define new DEBUG_NEW +#endif + namespace NLMISC { diff --git a/code/nel/src/misc/di_keyboard_device.cpp b/code/nel/src/misc/di_keyboard_device.cpp index dffc1f4da..0802019a4 100644 --- a/code/nel/src/misc/di_keyboard_device.cpp +++ b/code/nel/src/misc/di_keyboard_device.cpp @@ -27,6 +27,10 @@ #include "Mmsystem.h" +#ifdef DEBUG_NEW + #define new DEBUG_NEW +#endif + namespace NLMISC { diff --git a/code/nel/src/misc/di_mouse_device.cpp b/code/nel/src/misc/di_mouse_device.cpp index cce2650dc..2dfcf95f0 100644 --- a/code/nel/src/misc/di_mouse_device.cpp +++ b/code/nel/src/misc/di_mouse_device.cpp @@ -23,6 +23,10 @@ #ifdef NL_OS_WINDOWS +#ifdef DEBUG_NEW + #define new DEBUG_NEW +#endif + namespace NLMISC { diff --git a/code/nel/src/misc/diff_tool.cpp b/code/nel/src/misc/diff_tool.cpp index 9422e2a79..15a91cdb8 100644 --- a/code/nel/src/misc/diff_tool.cpp +++ b/code/nel/src/misc/diff_tool.cpp @@ -22,6 +22,9 @@ using namespace NLMISC; using namespace std; +#ifdef DEBUG_NEW + #define new DEBUG_NEW +#endif namespace STRING_MANAGER { diff --git a/code/nel/src/misc/dummy_window.cpp b/code/nel/src/misc/dummy_window.cpp index 90c36d55b..a0d807ac5 100644 --- a/code/nel/src/misc/dummy_window.cpp +++ b/code/nel/src/misc/dummy_window.cpp @@ -21,6 +21,10 @@ #ifdef NL_OS_WINDOWS +#ifdef DEBUG_NEW + #define new DEBUG_NEW +#endif + namespace NLMISC { diff --git a/code/nel/src/misc/dynloadlib.cpp b/code/nel/src/misc/dynloadlib.cpp index 7153643fc..6dcb7e4cf 100644 --- a/code/nel/src/misc/dynloadlib.cpp +++ b/code/nel/src/misc/dynloadlib.cpp @@ -21,6 +21,10 @@ using namespace std; +#ifdef DEBUG_NEW + #define new DEBUG_NEW +#endif + namespace NLMISC { diff --git a/code/nel/src/misc/eid_translator.cpp b/code/nel/src/misc/eid_translator.cpp index 710acb440..acf4046e5 100644 --- a/code/nel/src/misc/eid_translator.cpp +++ b/code/nel/src/misc/eid_translator.cpp @@ -31,6 +31,10 @@ using namespace std; +#ifdef DEBUG_NEW + #define new DEBUG_NEW +#endif + namespace NLMISC { // diff --git a/code/nel/src/misc/entity_id.cpp b/code/nel/src/misc/entity_id.cpp index b90a25ea3..b62bf1f1c 100644 --- a/code/nel/src/misc/entity_id.cpp +++ b/code/nel/src/misc/entity_id.cpp @@ -20,6 +20,10 @@ using namespace std; +#ifdef DEBUG_NEW + #define new DEBUG_NEW +#endif + namespace NLMISC { const uint64 CEntityId::MaxEntityId = ((uint64)1 << (CEntityId::ID_SIZE + 1)) - (uint64)1; diff --git a/code/nel/src/misc/event_emitter.cpp b/code/nel/src/misc/event_emitter.cpp index 946efd75c..0cf3aad72 100644 --- a/code/nel/src/misc/event_emitter.cpp +++ b/code/nel/src/misc/event_emitter.cpp @@ -19,6 +19,10 @@ // remove stupid VC6 warnings void foo_event_emitter_cpp() {} +#ifdef DEBUG_NEW + #define new DEBUG_NEW +#endif + namespace NLMISC { diff --git a/code/nel/src/misc/event_emitter_multi.cpp b/code/nel/src/misc/event_emitter_multi.cpp index f119601f5..52bc235cd 100644 --- a/code/nel/src/misc/event_emitter_multi.cpp +++ b/code/nel/src/misc/event_emitter_multi.cpp @@ -18,6 +18,10 @@ #include "nel/misc/event_emitter_multi.h" #include "nel/misc/system_utils.h" +#ifdef DEBUG_NEW + #define new DEBUG_NEW +#endif + namespace NLMISC { diff --git a/code/nel/src/misc/event_listener.cpp b/code/nel/src/misc/event_listener.cpp index 1b8b29017..14bb5d73d 100644 --- a/code/nel/src/misc/event_listener.cpp +++ b/code/nel/src/misc/event_listener.cpp @@ -20,6 +20,9 @@ #include "nel/misc/event_server.h" #include "nel/misc/events.h" +#ifdef DEBUG_NEW + #define new DEBUG_NEW +#endif namespace NLMISC { diff --git a/code/nel/src/misc/event_server.cpp b/code/nel/src/misc/event_server.cpp index 21ed8c576..eceb783fe 100644 --- a/code/nel/src/misc/event_server.cpp +++ b/code/nel/src/misc/event_server.cpp @@ -21,6 +21,9 @@ #include "nel/misc/event_emitter.h" #include "nel/misc/events.h" +#ifdef DEBUG_NEW + #define new DEBUG_NEW +#endif namespace NLMISC { diff --git a/code/nel/src/misc/events.cpp b/code/nel/src/misc/events.cpp index 1d88be177..daa651ed7 100644 --- a/code/nel/src/misc/events.cpp +++ b/code/nel/src/misc/events.cpp @@ -19,6 +19,9 @@ #include "nel/misc/events.h" #include "nel/misc/string_conversion.h" +#ifdef DEBUG_NEW + #define new DEBUG_NEW +#endif namespace NLMISC { diff --git a/code/nel/src/misc/fast_floor.cpp b/code/nel/src/misc/fast_floor.cpp index 614ad3474..29411492b 100644 --- a/code/nel/src/misc/fast_floor.cpp +++ b/code/nel/src/misc/fast_floor.cpp @@ -18,6 +18,10 @@ #include "nel/misc/fast_floor.h" +#ifdef DEBUG_NEW + #define new DEBUG_NEW +#endif + namespace NLMISC { int OptFastFloorCWStack[OptFastFloorCWStackSize]; diff --git a/code/nel/src/misc/fast_id_map.cpp b/code/nel/src/misc/fast_id_map.cpp index 3d434066c..5ba919b09 100644 --- a/code/nel/src/misc/fast_id_map.cpp +++ b/code/nel/src/misc/fast_id_map.cpp @@ -35,6 +35,10 @@ // Project includes +#ifdef DEBUG_NEW + #define new DEBUG_NEW +#endif + namespace NLMISC { void dummytoavoidthecompilerwarningfastidmap() { } diff --git a/code/nel/src/misc/fast_mem.cpp b/code/nel/src/misc/fast_mem.cpp index 6d7ca97ff..c957195b3 100644 --- a/code/nel/src/misc/fast_mem.cpp +++ b/code/nel/src/misc/fast_mem.cpp @@ -19,6 +19,9 @@ #include "nel/misc/fast_mem.h" #include "nel/misc/system_info.h" +#ifdef DEBUG_NEW + #define new DEBUG_NEW +#endif namespace NLMISC { diff --git a/code/nel/src/misc/game_device.cpp b/code/nel/src/misc/game_device.cpp index ee0924a1a..2ba49367f 100644 --- a/code/nel/src/misc/game_device.cpp +++ b/code/nel/src/misc/game_device.cpp @@ -17,6 +17,10 @@ #include "stdmisc.h" #include "nel/misc/game_device.h" +#ifdef DEBUG_NEW + #define new DEBUG_NEW +#endif + namespace NLMISC { diff --git a/code/nel/src/misc/game_device_events.cpp b/code/nel/src/misc/game_device_events.cpp index 59cc115d5..bf64a1c4b 100644 --- a/code/nel/src/misc/game_device_events.cpp +++ b/code/nel/src/misc/game_device_events.cpp @@ -18,6 +18,10 @@ #include "nel/misc/game_device_events.h" +#ifdef DEBUG_NEW + #define new DEBUG_NEW +#endif + namespace NLMISC { diff --git a/code/nel/src/misc/geom_ext.cpp b/code/nel/src/misc/geom_ext.cpp index 0b1735099..32dba1d60 100644 --- a/code/nel/src/misc/geom_ext.cpp +++ b/code/nel/src/misc/geom_ext.cpp @@ -24,6 +24,10 @@ void dummyToAvoidStupidCompilerWarning_misc_geom_ext_cpp() { } +#ifdef DEBUG_NEW + #define new DEBUG_NEW +#endif + namespace NLMISC { diff --git a/code/nel/src/misc/grid_traversal.cpp b/code/nel/src/misc/grid_traversal.cpp index 19e59e7c2..a88267331 100644 --- a/code/nel/src/misc/grid_traversal.cpp +++ b/code/nel/src/misc/grid_traversal.cpp @@ -19,6 +19,10 @@ #include "nel/misc/grid_traversal.h" #include "nel/misc/vector_2f.h" +#ifdef DEBUG_NEW + #define new DEBUG_NEW +#endif + namespace NLMISC { diff --git a/code/nel/src/misc/hierarchical_timer.cpp b/code/nel/src/misc/hierarchical_timer.cpp index 9d3c40c44..62dc0786a 100644 --- a/code/nel/src/misc/hierarchical_timer.cpp +++ b/code/nel/src/misc/hierarchical_timer.cpp @@ -26,6 +26,10 @@ #include "nel/misc/time_nl.h" #endif +#ifdef DEBUG_NEW + #define new DEBUG_NEW +#endif + namespace NLMISC { diff --git a/code/nel/src/misc/i18n.cpp b/code/nel/src/misc/i18n.cpp index c68b190c5..cf1803c76 100644 --- a/code/nel/src/misc/i18n.cpp +++ b/code/nel/src/misc/i18n.cpp @@ -22,6 +22,10 @@ using namespace std; +#ifdef DEBUG_NEW + #define new DEBUG_NEW +#endif + namespace NLMISC { CI18N::StrMapContainer CI18N::_StrMap; diff --git a/code/nel/src/misc/i_xml.cpp b/code/nel/src/misc/i_xml.cpp index 6cd675ace..d8925ddef 100644 --- a/code/nel/src/misc/i_xml.cpp +++ b/code/nel/src/misc/i_xml.cpp @@ -28,6 +28,10 @@ using namespace std; #define NLMISC_READ_BUFFER_SIZE 1024 +#ifdef DEBUG_NEW + #define new DEBUG_NEW +#endif + namespace NLMISC { diff --git a/code/nel/src/misc/input_device.cpp b/code/nel/src/misc/input_device.cpp index 03e8f8c39..3825935a6 100644 --- a/code/nel/src/misc/input_device.cpp +++ b/code/nel/src/misc/input_device.cpp @@ -20,6 +20,10 @@ // remove stupid VC6 warnings void foo_input_device_cpp() {} +#ifdef DEBUG_NEW + #define new DEBUG_NEW +#endif + namespace NLMISC { diff --git a/code/nel/src/misc/keyboard_device.cpp b/code/nel/src/misc/keyboard_device.cpp index 3fc0e07a1..4c7f353bc 100644 --- a/code/nel/src/misc/keyboard_device.cpp +++ b/code/nel/src/misc/keyboard_device.cpp @@ -18,6 +18,9 @@ //#include "nel/3d/u_keyboard_device.h" +#ifdef DEBUG_NEW + #define new DEBUG_NEW +#endif namespace NL3D { diff --git a/code/nel/src/misc/line.cpp b/code/nel/src/misc/line.cpp index b8148dfb5..aba33734c 100644 --- a/code/nel/src/misc/line.cpp +++ b/code/nel/src/misc/line.cpp @@ -18,6 +18,10 @@ #include "nel/misc/line.h" +#ifdef DEBUG_NEW + #define new DEBUG_NEW +#endif + namespace NLMISC { diff --git a/code/nel/src/misc/matrix.cpp b/code/nel/src/misc/matrix.cpp index 6fac71aa2..dd884f4d5 100644 --- a/code/nel/src/misc/matrix.cpp +++ b/code/nel/src/misc/matrix.cpp @@ -23,6 +23,9 @@ using namespace std; +#ifdef DEBUG_NEW + #define new DEBUG_NEW +#endif namespace NLMISC { diff --git a/code/nel/src/misc/md5.cpp b/code/nel/src/misc/md5.cpp index 363bc09f4..eaf9df6cc 100644 --- a/code/nel/src/misc/md5.cpp +++ b/code/nel/src/misc/md5.cpp @@ -52,6 +52,10 @@ documentation and/or software. using namespace std; +#ifdef DEBUG_NEW + #define new DEBUG_NEW +#endif + namespace NLMISC { // **************************************************************************** diff --git a/code/nel/src/misc/mem_displayer.cpp b/code/nel/src/misc/mem_displayer.cpp index 1dc156913..52d399350 100644 --- a/code/nel/src/misc/mem_displayer.cpp +++ b/code/nel/src/misc/mem_displayer.cpp @@ -37,6 +37,10 @@ using namespace std; +#ifdef DEBUG_NEW + #define new DEBUG_NEW +#endif + namespace NLMISC { diff --git a/code/nel/src/misc/mem_stream.cpp b/code/nel/src/misc/mem_stream.cpp index 7396dbbab..49e19f523 100644 --- a/code/nel/src/misc/mem_stream.cpp +++ b/code/nel/src/misc/mem_stream.cpp @@ -18,6 +18,10 @@ #include "nel/misc/mem_stream.h" +#ifdef DEBUG_NEW + #define new DEBUG_NEW +#endif + namespace NLMISC { diff --git a/code/nel/src/misc/mouse_smoother.cpp b/code/nel/src/misc/mouse_smoother.cpp index e8389119d..a92cbca6e 100644 --- a/code/nel/src/misc/mouse_smoother.cpp +++ b/code/nel/src/misc/mouse_smoother.cpp @@ -17,6 +17,10 @@ #include "stdmisc.h" #include "nel/misc/mouse_smoother.h" +#ifdef DEBUG_NEW + #define new DEBUG_NEW +#endif + namespace NLMISC { diff --git a/code/nel/src/misc/noise_value.cpp b/code/nel/src/misc/noise_value.cpp index 5b6507be3..28fe24001 100644 --- a/code/nel/src/misc/noise_value.cpp +++ b/code/nel/src/misc/noise_value.cpp @@ -20,6 +20,9 @@ #include "nel/misc/fast_floor.h" +#ifdef DEBUG_NEW + #define new DEBUG_NEW +#endif namespace NLMISC { diff --git a/code/nel/src/misc/o_xml.cpp b/code/nel/src/misc/o_xml.cpp index 1bd5d3d7b..005ef8000 100644 --- a/code/nel/src/misc/o_xml.cpp +++ b/code/nel/src/misc/o_xml.cpp @@ -25,6 +25,10 @@ using namespace std; +#ifdef DEBUG_NEW + #define new DEBUG_NEW +#endif + namespace NLMISC { diff --git a/code/nel/src/misc/object_vector.cpp b/code/nel/src/misc/object_vector.cpp index c547dfc8d..7a863342b 100644 --- a/code/nel/src/misc/object_vector.cpp +++ b/code/nel/src/misc/object_vector.cpp @@ -23,6 +23,9 @@ void dummyToAvoidStupidCompilerWarning_misc_object_vector_cpp() { } +#ifdef DEBUG_NEW + #define new DEBUG_NEW +#endif namespace NLMISC { diff --git a/code/nel/src/misc/p_thread.cpp b/code/nel/src/misc/p_thread.cpp index ab5530342..e4deab4ca 100644 --- a/code/nel/src/misc/p_thread.cpp +++ b/code/nel/src/misc/p_thread.cpp @@ -24,6 +24,10 @@ #include #include +#ifdef DEBUG_NEW + #define new DEBUG_NEW +#endif + namespace NLMISC { /* Key for thread specific storage holding IThread pointer. */ diff --git a/code/nel/src/misc/plane.cpp b/code/nel/src/misc/plane.cpp index 505a5cb62..7da917459 100644 --- a/code/nel/src/misc/plane.cpp +++ b/code/nel/src/misc/plane.cpp @@ -19,6 +19,9 @@ #include "nel/misc/plane.h" #include "nel/misc/uv.h" +#ifdef DEBUG_NEW + #define new DEBUG_NEW +#endif namespace NLMISC { diff --git a/code/nel/src/misc/polygon.cpp b/code/nel/src/misc/polygon.cpp index 2942fb66b..b541d2eba 100644 --- a/code/nel/src/misc/polygon.cpp +++ b/code/nel/src/misc/polygon.cpp @@ -24,6 +24,9 @@ using namespace std; using namespace NLMISC; +#ifdef DEBUG_NEW + #define new DEBUG_NEW +#endif namespace NLMISC { diff --git a/code/nel/src/misc/quad.cpp b/code/nel/src/misc/quad.cpp index 6486bb5c1..8fced3318 100644 --- a/code/nel/src/misc/quad.cpp +++ b/code/nel/src/misc/quad.cpp @@ -24,6 +24,10 @@ void dummyToAvoidStupidCompilerWarning_misc_quad_cpp() { } +#ifdef DEBUG_NEW + #define new DEBUG_NEW +#endif + namespace NLMISC { diff --git a/code/nel/src/misc/quat.cpp b/code/nel/src/misc/quat.cpp index 950870842..c1b441df9 100644 --- a/code/nel/src/misc/quat.cpp +++ b/code/nel/src/misc/quat.cpp @@ -18,6 +18,9 @@ #include "nel/misc/quat.h" +#ifdef DEBUG_NEW + #define new DEBUG_NEW +#endif namespace NLMISC { diff --git a/code/nel/src/misc/reader_writer.cpp b/code/nel/src/misc/reader_writer.cpp index 22019aaa3..57c5c517d 100644 --- a/code/nel/src/misc/reader_writer.cpp +++ b/code/nel/src/misc/reader_writer.cpp @@ -18,6 +18,9 @@ #include "nel/misc/reader_writer.h" +#ifdef DEBUG_NEW + #define new DEBUG_NEW +#endif namespace NLMISC { diff --git a/code/nel/src/misc/rect.cpp b/code/nel/src/misc/rect.cpp index 40acd9456..d4347b7e9 100644 --- a/code/nel/src/misc/rect.cpp +++ b/code/nel/src/misc/rect.cpp @@ -19,6 +19,9 @@ #include "nel/misc/rect.h" #include "nel/misc/vector_2f.h" +#ifdef DEBUG_NEW + #define new DEBUG_NEW +#endif namespace NLMISC { diff --git a/code/nel/src/misc/report.cpp b/code/nel/src/misc/report.cpp index cf60f3441..64871e6a3 100644 --- a/code/nel/src/misc/report.cpp +++ b/code/nel/src/misc/report.cpp @@ -33,6 +33,10 @@ using namespace std; +#ifdef DEBUG_NEW + #define new DEBUG_NEW +#endif + namespace NLMISC { diff --git a/code/nel/src/misc/rgba.cpp b/code/nel/src/misc/rgba.cpp index 1d7a88f6b..8075d78b2 100644 --- a/code/nel/src/misc/rgba.cpp +++ b/code/nel/src/misc/rgba.cpp @@ -21,6 +21,9 @@ #include "nel/misc/system_info.h" #include "nel/misc/common.h" +#ifdef DEBUG_NEW + #define new DEBUG_NEW +#endif namespace NLMISC { diff --git a/code/nel/src/misc/sha1.cpp b/code/nel/src/misc/sha1.cpp index 64c94ee6f..19e8a440a 100644 --- a/code/nel/src/misc/sha1.cpp +++ b/code/nel/src/misc/sha1.cpp @@ -31,6 +31,10 @@ using namespace std; using namespace NLMISC; +#ifdef DEBUG_NEW + #define new DEBUG_NEW +#endif + // // Types // diff --git a/code/nel/src/misc/sheet_id.cpp b/code/nel/src/misc/sheet_id.cpp index 9a9b8813f..7bc9c7c61 100644 --- a/code/nel/src/misc/sheet_id.cpp +++ b/code/nel/src/misc/sheet_id.cpp @@ -29,6 +29,10 @@ using namespace std; +#ifdef DEBUG_NEW + #define new DEBUG_NEW +#endif + namespace NLMISC { CSheetId::CChar CSheetId::_AllStrings; diff --git a/code/nel/src/misc/smart_ptr.cpp b/code/nel/src/misc/smart_ptr.cpp index a85edfbe9..e5c31fcd7 100644 --- a/code/nel/src/misc/smart_ptr.cpp +++ b/code/nel/src/misc/smart_ptr.cpp @@ -18,6 +18,9 @@ #include "nel/misc/smart_ptr.h" +#ifdef DEBUG_NEW + #define new DEBUG_NEW +#endif namespace NLMISC { diff --git a/code/nel/src/misc/stl_block_allocator.cpp b/code/nel/src/misc/stl_block_allocator.cpp index 3b519f736..f57d0c238 100644 --- a/code/nel/src/misc/stl_block_allocator.cpp +++ b/code/nel/src/misc/stl_block_allocator.cpp @@ -21,6 +21,9 @@ // remove stupid VC6 warnings void foo_stl_block_allocator_cpp() {} +#ifdef DEBUG_NEW + #define new DEBUG_NEW +#endif namespace NLMISC { diff --git a/code/nel/src/misc/stl_block_list.cpp b/code/nel/src/misc/stl_block_list.cpp index a4474d65f..628b79371 100644 --- a/code/nel/src/misc/stl_block_list.cpp +++ b/code/nel/src/misc/stl_block_list.cpp @@ -21,6 +21,10 @@ // remove stupid VC6 warnings void foo_stl_block_list_cpp() {} +#ifdef DEBUG_NEW + #define new DEBUG_NEW +#endif + namespace NLMISC { diff --git a/code/nel/src/misc/stop_watch.cpp b/code/nel/src/misc/stop_watch.cpp index 420f29914..59b62150e 100644 --- a/code/nel/src/misc/stop_watch.cpp +++ b/code/nel/src/misc/stop_watch.cpp @@ -20,6 +20,10 @@ using namespace std; +#ifdef DEBUG_NEW + #define new DEBUG_NEW +#endif + namespace NLMISC { diff --git a/code/nel/src/misc/stream.cpp b/code/nel/src/misc/stream.cpp index e592e4d4a..c652d6fe9 100644 --- a/code/nel/src/misc/stream.cpp +++ b/code/nel/src/misc/stream.cpp @@ -21,6 +21,9 @@ using namespace std; +#ifdef DEBUG_NEW + #define new DEBUG_NEW +#endif namespace NLMISC { diff --git a/code/nel/src/misc/string_common.cpp b/code/nel/src/misc/string_common.cpp index f06258893..dd8d1fe96 100644 --- a/code/nel/src/misc/string_common.cpp +++ b/code/nel/src/misc/string_common.cpp @@ -20,6 +20,10 @@ using namespace std; +#ifdef DEBUG_NEW + #define new DEBUG_NEW +#endif + namespace NLMISC { diff --git a/code/nel/src/misc/string_id_array.cpp b/code/nel/src/misc/string_id_array.cpp index 5dfc5d318..b9489e3f9 100644 --- a/code/nel/src/misc/string_id_array.cpp +++ b/code/nel/src/misc/string_id_array.cpp @@ -24,6 +24,10 @@ void dummyToAvoidStupidCompilerWarning_misc_string_id_array_cpp() { } +#ifdef DEBUG_NEW + #define new DEBUG_NEW +#endif + namespace NLMISC { diff --git a/code/nel/src/misc/string_mapper.cpp b/code/nel/src/misc/string_mapper.cpp index 9b896f206..cf8a38e49 100644 --- a/code/nel/src/misc/string_mapper.cpp +++ b/code/nel/src/misc/string_mapper.cpp @@ -20,6 +20,10 @@ using namespace std; +#ifdef DEBUG_NEW + #define new DEBUG_NEW +#endif + namespace NLMISC { diff --git a/code/nel/src/misc/system_utils.cpp b/code/nel/src/misc/system_utils.cpp index c62f0b46d..c60364741 100644 --- a/code/nel/src/misc/system_utils.cpp +++ b/code/nel/src/misc/system_utils.cpp @@ -28,6 +28,10 @@ #endif #endif +#ifdef DEBUG_NEW + #define new DEBUG_NEW +#endif + using namespace std; // Key in registry diff --git a/code/nel/src/misc/task_manager.cpp b/code/nel/src/misc/task_manager.cpp index 13af3e4ac..4cdb16bd0 100644 --- a/code/nel/src/misc/task_manager.cpp +++ b/code/nel/src/misc/task_manager.cpp @@ -23,6 +23,10 @@ using namespace std; #define NLMISC_DONE_TASK_SIZE 20 +#ifdef DEBUG_NEW + #define new DEBUG_NEW +#endif + namespace NLMISC { /* diff --git a/code/nel/src/misc/triangle.cpp b/code/nel/src/misc/triangle.cpp index 3fcde2ec9..234eb0506 100644 --- a/code/nel/src/misc/triangle.cpp +++ b/code/nel/src/misc/triangle.cpp @@ -20,6 +20,9 @@ #include "nel/misc/plane.h" #include "nel/misc/matrix.h" +#ifdef DEBUG_NEW + #define new DEBUG_NEW +#endif namespace NLMISC { diff --git a/code/nel/src/misc/unicode.cpp b/code/nel/src/misc/unicode.cpp index ac58580ee..00bf6a226 100644 --- a/code/nel/src/misc/unicode.cpp +++ b/code/nel/src/misc/unicode.cpp @@ -17,6 +17,10 @@ #include "stdmisc.h" #include "nel/misc/ucstring.h" +#ifdef DEBUG_NEW + #define new DEBUG_NEW +#endif + namespace NLMISC { diff --git a/code/nel/src/misc/uv.cpp b/code/nel/src/misc/uv.cpp index f25643300..9926efcc7 100644 --- a/code/nel/src/misc/uv.cpp +++ b/code/nel/src/misc/uv.cpp @@ -24,6 +24,10 @@ void dummyToAvoidStupidCompilerWarning_misc_uv_cpp() { } +#ifdef DEBUG_NEW + #define new DEBUG_NEW +#endif + namespace NLMISC { diff --git a/code/nel/src/misc/variable.cpp b/code/nel/src/misc/variable.cpp index 48c775c9c..16953f990 100644 --- a/code/nel/src/misc/variable.cpp +++ b/code/nel/src/misc/variable.cpp @@ -21,6 +21,10 @@ using namespace std; using namespace NLMISC; +#ifdef DEBUG_NEW + #define new DEBUG_NEW +#endif + namespace NLMISC { diff --git a/code/nel/src/misc/vector.cpp b/code/nel/src/misc/vector.cpp index 7230a75c6..dc64925b7 100644 --- a/code/nel/src/misc/vector.cpp +++ b/code/nel/src/misc/vector.cpp @@ -20,6 +20,9 @@ using namespace std; +#ifdef DEBUG_NEW + #define new DEBUG_NEW +#endif namespace NLMISC { diff --git a/code/nel/src/misc/vector_2d.cpp b/code/nel/src/misc/vector_2d.cpp index 5ab0ffdec..939e41239 100644 --- a/code/nel/src/misc/vector_2d.cpp +++ b/code/nel/src/misc/vector_2d.cpp @@ -24,6 +24,10 @@ void dummyToAvoidStupidCompilerWarning_misc_vector_2d_cpp() { } +#ifdef DEBUG_NEW + #define new DEBUG_NEW +#endif + namespace NLMISC { diff --git a/code/nel/src/misc/vector_2f.cpp b/code/nel/src/misc/vector_2f.cpp index 0e9621601..08bd0d096 100644 --- a/code/nel/src/misc/vector_2f.cpp +++ b/code/nel/src/misc/vector_2f.cpp @@ -18,6 +18,9 @@ #include "nel/misc/vector_2f.h" +#ifdef DEBUG_NEW + #define new DEBUG_NEW +#endif namespace NLMISC { diff --git a/code/nel/src/misc/vector_h.cpp b/code/nel/src/misc/vector_h.cpp index 528f5f4cc..67eb41f6b 100644 --- a/code/nel/src/misc/vector_h.cpp +++ b/code/nel/src/misc/vector_h.cpp @@ -24,6 +24,10 @@ void dummyToAvoidStupidCompilerWarning_misc_vector_h_cpp() { } +#ifdef DEBUG_NEW + #define new DEBUG_NEW +#endif + namespace NLMISC { diff --git a/code/nel/src/misc/vectord.cpp b/code/nel/src/misc/vectord.cpp index 1273f190a..aa14a3828 100644 --- a/code/nel/src/misc/vectord.cpp +++ b/code/nel/src/misc/vectord.cpp @@ -18,6 +18,9 @@ #include "nel/misc/vectord.h" +#ifdef DEBUG_NEW + #define new DEBUG_NEW +#endif namespace NLMISC { diff --git a/code/nel/src/misc/win32_util.cpp b/code/nel/src/misc/win32_util.cpp index 17601797b..63315e1b2 100644 --- a/code/nel/src/misc/win32_util.cpp +++ b/code/nel/src/misc/win32_util.cpp @@ -22,6 +22,10 @@ #include +#ifdef DEBUG_NEW + #define new DEBUG_NEW +#endif + namespace NLMISC { diff --git a/code/nel/src/misc/win_event_emitter.cpp b/code/nel/src/misc/win_event_emitter.cpp index cf3ff2197..b330d7e57 100644 --- a/code/nel/src/misc/win_event_emitter.cpp +++ b/code/nel/src/misc/win_event_emitter.cpp @@ -32,6 +32,9 @@ */ #include +#ifdef DEBUG_NEW + #define new DEBUG_NEW +#endif namespace NLMISC { diff --git a/code/nel/src/misc/window_displayer.cpp b/code/nel/src/misc/window_displayer.cpp index f54c82505..5c9227933 100644 --- a/code/nel/src/misc/window_displayer.cpp +++ b/code/nel/src/misc/window_displayer.cpp @@ -24,6 +24,10 @@ using namespace std; +#ifdef DEBUG_NEW + #define new DEBUG_NEW +#endif + namespace NLMISC { class CUpdateThread : public IRunnable diff --git a/code/nel/src/misc/words_dictionary.cpp b/code/nel/src/misc/words_dictionary.cpp index f35c41abe..e2113e62d 100644 --- a/code/nel/src/misc/words_dictionary.cpp +++ b/code/nel/src/misc/words_dictionary.cpp @@ -25,6 +25,10 @@ using namespace std; const string DefaultColTitle = "name"; +#ifdef DEBUG_NEW + #define new DEBUG_NEW +#endif + namespace NLMISC { NL_INSTANCE_COUNTER_IMPL(CWordsDictionary); diff --git a/code/nel/src/misc/xml_pack.cpp b/code/nel/src/misc/xml_pack.cpp index feab06775..4494be062 100644 --- a/code/nel/src/misc/xml_pack.cpp +++ b/code/nel/src/misc/xml_pack.cpp @@ -20,6 +20,9 @@ using namespace std; +#ifdef DEBUG_NEW + #define new DEBUG_NEW +#endif namespace NLMISC {