SymCleanup function (dbghelp.h)
Deallocates all resources associated with the process handle.
Syntax
BOOL IMAGEAPI SymCleanup(
[in] HANDLE hProcess
);
Parameters
[in] hProcess
A handle to the process that was originally passed to the SymInitialize function.
Return value
If the function succeeds, the return value is TRUE.
If the function fails, the return value is FALSE. To retrieve extended error information, call GetLastError.
Remarks
This function frees all resources associated with the process handle. Failure to call this function causes memory and resource leaks in the calling application
All DbgHelp functions, such as this one, are single threaded. Therefore, calls from more than one thread to this function will likely result in unexpected behavior or memory corruption. To avoid this, call SymInitialize only when your process starts and SymCleanup only when your process ends. It is not necessary for each thread in the process to call these functions.
Examples
For an example, see Terminating the Symbol Handler.
Requirements
Requirement | Value |
---|---|
Target Platform | Windows |
Header | dbghelp.h |
Library | Dbghelp.lib |
DLL | Dbghelp.dll |
Redistributable | DbgHelp.dll 5.1 or later |