FreeMemoryTypedArray

static void FreeMemoryTypedArray(sData: unsigned char*, nSize: const size_t*)

Description

Frees the memory for a typed array.

Please note, that for the .docbuilder file the CDocBuilderContext.FreeMemoryTypedArray method is not used.

Parameters

sDataunsigned char*
The allocated memory to be released.
nSizeconst size_t*
The buffer array size.

Example

C++

std::wstring sWorkDirectory = NSUtils::GetBuilderDirectory();
CDocBuilder::Initialize(sWorkDirectory.c_str());
CDocBuilder oBuilder;
CContext oContext = oBuilder.GetContext();
unsigned char* sBuffer = oContext.AllocMemoryTypedArray(1500);
CVlaue oTypedArray = oContext.CreateTypedArray(sBuffer, 3, true);
oContext.FreeMemoryTypedArray(sBuffer, 3);
CDocBuilder::Dispose();

Get Help

  • If you have any questions about ONLYOFFICE Docs, try the FAQ section first.
  • You can request a feature or report a bug by posting an issue on GitHub.
  • You can also ask our developers on ONLYOFFICE forum (registration required).