chsvlib
chsv helper source code

◆ FreeString()

void Chusov::String::FreeString ( CHAR_TYPE *  lpszString)
noexcept

The function frees memory occupied by the string buffer the parameter points to. The memory must be allocated by one of the Chusov::Memory or Chusov::String allocation functions.

Template Parameters
CHAR_TYPEis a type of a string to free. Currently the template is defined only for CHAR_TYPE=char and CHAR_TYPE=wchar_t resolving to FreeStringA and FreeStringW respectively.
Parameters
[in]lpszStringis a pointer to the string buffer to free.
Warning
The function should not be used to free sensitive data because it operates without suiting any security requirements. Instead use the functions randomizing the memory before it is freed, such as SecureFreeData, SecureFreeString, etc.
See also
FreeStringA;
FreeStringW;
SecureFreeString;
AllocateString;
AllocateAndFormatString;
AllocateAndFormatStringByTags;
AllocateAndFormatStringByTagsIndirect.