Foxit Quick PDF Library

Memory Management and the DLL and LIB editions of Foxit Quick PDF Library

The creation and release of memory buffers are handled automatically in most scenarios by the DLL and LIB editions of Foxit 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.

This article refers to a deprecated product. If you are looking for support for Foxit PDF SDK, please click here.

Updated on May 16, 2022

Was this article helpful?
Thanks for your feedback. If you have a comment on how to improve the article, you can write it here: