EldoS | Feel safer!

Software components for data protection, secure storage and transfer

(VCL) I have found a memory leak - global objects are not deleted.

The leaks you have noticed are not the leaks actually. During its work SecureBlackbox creates several global objects that must reside in memory until the application terminates (cryptographic core objects). When the process in destroyed, the objects are freed by the operating system anyway.

We do not destroy the objects manually (in finalization sections), as this might cause certain problems with multithreaded applications. Delphi provides no guaranteed way to detect the sequence of execution of finalization sections of different units, so there can be a situation that some object attempts to access a core object after the latter has been destroyed.

If you need to use the components within a DLL (that can be unloaded without termination of the host process), please use SBUtils.CleanupRegisteredGlobalObjects() function to release the memory allocated for the core objects. Actually, you can use it not only from a DLL but from a generic application too, however, as mentioned, we do not recommend it as using this function can lead to hard-to-trace bugs and crashes on application shutdown.

Return to the list


Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!