Open CASCADE Technology
7.6.0
|
#include <OSD_MAllocHook.hxx>
Data Structures | |
class | Callback |
class | CollectBySize |
class | LogFileHandler |
Static Public Member Functions | |
static void | SetCallback (Callback *theCB) |
Set handler of allocation/deallocation events. More... | |
static Callback * | GetCallback () |
Get current handler of allocation/deallocation events. More... | |
static LogFileHandler * | GetLogFileHandler () |
Get static instance of LogFileHandler handler. More... | |
static CollectBySize * | GetCollectBySize () |
Get static instance of CollectBySize handler. More... | |
This class provides the possibility to set callback for memory allocation/deallocation. On MS Windows, it works only in Debug builds. It relies on the debug CRT function _CrtSetAllocHook (see MSDN for help).
|
static |
Get current handler of allocation/deallocation events.
|
static |
Get static instance of CollectBySize handler.
|
static |
Get static instance of LogFileHandler handler.
|
static |
Set handler of allocation/deallocation events.
You can pass here any implementation. For easy start, you can try with the predefined handler LogFileHandler, which static instance is returned by GetLogFileHandler(). To clear the handler, pass NULL here.