Open CASCADE Technology 7.9.1
Loading...
Searching...
No Matches
OSD_MAllocHook Class Reference

#include <OSD_MAllocHook.hxx>

Data Structures

class  Callback
class  LogFileHandler
class  CollectBySize

Static Public Member Functions

static void SetCallback (Callback *theCB)
 Set handler of allocation/deallocation events.
static CallbackGetCallback ()
 Get current handler of allocation/deallocation events.
static LogFileHandlerGetLogFileHandler ()
 Get static instance of LogFileHandler handler.
static CollectBySizeGetCollectBySize ()
 Get static instance of CollectBySize handler.

Detailed Description

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).

Member Function Documentation

◆ GetCallback()

Callback * OSD_MAllocHook::GetCallback ( )
static

Get current handler of allocation/deallocation events.

◆ GetCollectBySize()

CollectBySize * OSD_MAllocHook::GetCollectBySize ( )
static

Get static instance of CollectBySize handler.

◆ GetLogFileHandler()

LogFileHandler * OSD_MAllocHook::GetLogFileHandler ( )
static

Get static instance of LogFileHandler handler.

◆ SetCallback()

void OSD_MAllocHook::SetCallback ( Callback * theCB)
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.


The documentation for this class was generated from the following file: