Foxit Quick PDF Library

Releasing buffer memory when using DLL or LIB edition

With a DLL there are a few different ways of handling memory. Many libraries ask the user to create the buffer but with the DLL and LIB editions of Foxit Quick PDF Library the library itself maintains the buffer. So if you call a certain function that returns a string then that memory will be kept by Foxit Quick PDF Library until the next function that returns a string.

So if for example you are using the digital signature functions and you make a call to the EndSignProcessToString function then the internal buffer keeps the data until it is cleared by a new call to a function that requires an internal buffer. Calling something like the LibraryVersion function will clear that internal buffer, setting it to a smallish string, thereby releasing the memory.

This only applies to the DLL and LIB editions of Foxit Quick PDF Library as functions that return a string actually return a pointer to the first character of the string data whereas with the Delphi and ActiveX editions the functions that return a string are actually returning a string object.

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: