Changeset 88 for osgVisual/src/core


Ignore:
Timestamp:
Jul 29, 2010, 8:39:55 AM (14 years ago)
Author:
Torben Dannhauer
Message:

Moved memory leak detection from source file to headerfile. Its still in the class but at least not in the source file.

The leak detection works, but the false positives are not stopped.
Use Linux/Valgrind? to make your final leak detection beyond the easy first approach in MSVC

Location:
osgVisual/src/core
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • osgVisual/src/core/osgVisual.cpp

    r87 r88  
    2626#endif
    2727
     28
    2829//#include <windows.h>
    2930
     
    4243#ifdef _DEBUG
    4344        #ifdef WIN32
    44                 #include <leakDetection.h>      // ugly but must be included inside the class
    45 
     45                #include <leakDetection.h>      // for main: must be inside function. In classes: headerfile inside calss is sufficient
    4646                int tmp_flag;
    4747
     
    5555                        _CRTDBG_MODE_DEBUG);
    5656
    57                 // output to the file if not under VS
     57                // output to the file
    5858                _CrtSetReportFile(_CRT_ASSERT, log_file);
    5959                _CrtSetReportFile(_CRT_WARN, log_file);
  • osgVisual/src/core/visual_core.cpp

    r87 r88  
    2323{
    2424        OSG_NOTIFY( osg::ALWAYS ) << "visual_core instantiated." << std::endl;
    25         #include <leakDetection.h>
    2625}
    2726
     
    4948
    5049        // Test memory leak (todo)
    51         //double* test = new double[1000];
     50        double* test = new double[1000];
    5251
    5352        #ifdef USE_SPACENAVIGATOR
Note: See TracChangeset for help on using the changeset viewer.