Open Reality Reference Guide
 
Loading...
Searching...
No Matches
creation / deletion log utility functions.

This set of utility functions are useful for tracing the object creation / deletion. More...

Functions

K_DLLIMPORT void FBObjectLifeLogEnable (bool pEnable)
 Enable object creation / deletion logging.
 
K_DLLIMPORT unsigned int FBObjectGetGlobalUniqueId ()
 Get the global static object unique ID counter.
 
K_DLLIMPORT void FBObjectPrintLivings (unsigned int pStartUniqueId)
 Print those living objects created when logging is enabled.
 
K_DLLIMPORT unsigned int FBObjectGetLivingCount ()
 Get current total living object count.
 

Detailed Description

This set of utility functions are useful for tracing the object creation / deletion.

It help to identify potential memory leak inside SDK plugin, or even inside MoBu for particular client workflow.

see Sctipts/Samples/Utilities/DebugMemoryLeak.py for usage example.

Function Documentation

◆ FBObjectGetGlobalUniqueId()

K_DLLIMPORT unsigned int FBObjectGetGlobalUniqueId ( )

Get the global static object unique ID counter.

Each new created object will be assigned this global unique ID. Object.UniqueID = GlobalUniqueID++

◆ FBObjectGetLivingCount()

K_DLLIMPORT unsigned int FBObjectGetLivingCount ( )

Get current total living object count.

◆ FBObjectLifeLogEnable()

K_DLLIMPORT void FBObjectLifeLogEnable ( bool  pEnable)

Enable object creation / deletion logging.

Default logging if off This logging may hurt performance slightly. use it only for debug purpose.

Parameters
pEnabletrue to enable logging.

◆ FBObjectPrintLivings()

K_DLLIMPORT void FBObjectPrintLivings ( unsigned int  pStartUniqueId)

Print those living objects created when logging is enabled.

Parameters
pStartUniqueIdAny living object has been logged and with its uniqueId no less than pStartUniqueId will be printed out.