chsvlib
chsv helper source code

◆ FreeData()

bool Chusov::Memory::FreeData ( void *  pData)
noexcept

Frees memory occupied by the specified buffer which had been allocated using one of the Allocate* functions declared in the Chusov::Memory namespace.

Parameters
[in]pDatais a pointer to the buffer to be freed.
Returns
The function returns true on success and false on failure. Use GetLastChsvError function to get extended error information.
Warning
The function should not be used to free sensitive data because it operates without suiting any security requirements. Instead use the functions performing wiping out the memory before it is freed, such as SecureFreeData, SecureFreeString, etc.
See also
AllocateData;
AllocateStringW;
SecureFreeData.