Public Types | |
enum | BS_RES_OUTPUT { BS_RES_OUTPUT_NONE = 0x00, BS_RES_OUTPUT_LOAD_LIBRARY = 0x01, BS_RES_OUTPUT_MEM_ALLOC = 0x02, BS_RES_OUTPUT_CRITICAL_SECTION = 0x04, BS_RES_OUTPUT_ALL = BS_RES_OUTPUT_MEM_ALLOC|BS_RES_OUTPUT_LOAD_LIBRARY|BS_RES_OUTPUT_CRITICAL_SECTION, BS_RES_OUTPUT_DEFAULT = BS_RES_OUTPUT_ALL } |
enum | BS_RES_TYPE { BS_RES_UNKNOWN = 0x00, BS_RES_LOAD_LIBRARY = 0x01, BS_RES_MEM_ALLOC = 0x02, BS_RES_CRITICAL_SECTION = 0x03 } |
Public Member Functions | |
void | Activate () |
DWORD | AppendRef (LPVOID pPtr, LPCSTR lpFileName, int nLine, BOOL bDelete, LPCSTR lpComment="No Additional Comment") |
CBS_ResTrack (BOOL bActivate=FALSE) | |
void | Check () |
void | CheckNFree () |
DWORD | CountRef (DWORD dwPtr, LPDWORD lpdwDeleted) |
DECLARE_OPERATORS (BS_RES_OUTPUT) | |
DECLARE_SET_GET_MODE (BS_RES_OUTPUT, m_bsOutput, Output) | |
DWORD | Find (DWORD dwFind) |
void | Free () |
DWORD | GetMBTime () |
BOOL | IsActive () |
DWORD | Merge (CBS_ResTrack *pMerge) |
DWORD | Register (BS_RES_TYPE resType, LPVOID pPtr, int iSize, BOOL bEnableRefCount, LPCSTR lpFileName=NULL, int nLine=0, LPCSTR lpComment="No Additional Comment") |
DWORD | RemoveThreadReferances (DWORD dwPtr) |
DWORD | SetMBTime (DWORD dwNewTime) |
BOOL | SetOutputFile (LPCSTR lpcFileName) |
DWORD | UnRegister (LPVOID pPtr) |
virtual | ~CBS_ResTrack () |
****************************************
Bitspot's Resources Track found failure in the resources allocation!!! Date: Tuesday, September 28, 2004 12:24:22.936
****************************************
////////////////////////////////////////
Loading Library at:
c:\bitspot\MyApp\Sample.cpp(147): Loading GSupport lib.
Added (2) references
c:\bitspot\MyLib\SampleLib.cpp(548): Incrementing GSupport Library Reference Count.
c:\bitspot\MyLib\AnotherSampleLib.cpp(434): Incrementing GSupport Library Reference Count.
Deleted (2) references
c:\bitspot\MyLib\AnotherSampleLib.cpp(406): Decrementing GSupport Library Reference Count.
c:\bitspot\MyApp\Sample.cpp(214): Decrementing GSupport Library Reference Count.
****************************************
End of Bitspot's Resources Track Report.
****************************************
|
|
The type of resource, the type will be saved with the information when the resource is registered. |
|
Constructor.
|
|
Destructor. CheckNFree( ) is invoked to check if unfreed are still registered.
|
|
Activates the object. The registration function will assert if the application will try to add a reference before this function is invoked either by instatiating the object with bActivate = TRUE or by an excplicit call.
|
|
Appneds an added or deleted reference of a registered resource.
|
|
Checks and report unfreed resources. In the debug version a detected unfreed resource will open a message box and ask the user if it wants a detailed report to be saved in a file (and debug output window, if the debugger is present). In the release version 2 beeps will be generated in case an unfreed resource is found. To activate the reporting in release version the application should start with the parameter "-ResTrack=On".
|
|
Checks and free the resource list.
|
|
Counts the number of references of a certain object saved in the resource list.
|
|
Declares the operators for the enum member CBS_ResTrack::BS_RES_OUTPUT in order to avoid compiler error (or casting). |
|
Declares the folowing members function for manipulating the enum member m_bsOutput:
|
|
Finds the index of the node with the given resource address.
|
|
Frees the resource list and the resources allocated by the current object.
|
|
See return.
|
|
See return.
|
|
Merges two Resource Track objects. This is usfull when an application uses more then one DLL that uses Resource Track (e.g. GSupport and BS_Crypto). Those DLL could Merge both Resource Track and use only one.
|
|
Registers a new resource in the track list.
|
|
Clears references of an object that belongs to the current thread. This feature is used with the Critical Section objects when a thread gives up the ownership on it.
|
|
Sets the message box timeout (-1 = infinite timeout).
|
|
Sets an output file.
|
|
Removes a resource node from the list.
|
Bitspot AG |
||
Phone: |
+41 41 755 11 22 |
|
Fax: |
+41 41 755 11 31 |
|
e-mail: |
||
Web: |
||