The creation and release of memory buffers are handled automatically in most scenarios by the DLL and LIB editions of Debenu Quick PDF Library.

There is an internal buffer where all string results are stored. The AnsiStringResultLength function can be called to get the length of this buffer. This function returns the length of the most recent string returned from the library by all functions that return 8-bit strings.

The same string is used internally for all results and is updated every time a function is called that returns a string. So if the RenderPageToString function is called then the returned string will be stored in the internal buffer until a different function which returns a string is called.

In the event that the internal buffer grows too large due to rendering a large file to a string you could call the LibraryVersion function, which needs just 5 bytes, so that the memory holding the rendered output is released.

Finally, all memory is released when you call the ReleaseLibrary function.