Open CASCADE Technology  6.5.4
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Data Structures | Static Public Member Functions
OSD_MAllocHook Class Reference

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

static Callback* OSD_MAllocHook::GetCallback ( ) [static]
static void OSD_MAllocHook::SetCallback ( Callback theCB) [static]

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: