EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Free AFactory on Unregister***Factory

Also by EldoS: CallbackDisk
Create virtual disks backed by memory or custom location, expose disk images as disks and more.
Posted: 02/13/2013 08:54:01
by Birger Jansen (Standard support level)
Joined: 07/19/2012
Posts: 73

I know much has been written already about memleaks and why some of them cannot be fixed. Still I try to minimize memleaks from SBB components to make it easier to detect my own leaks and errors.

I am left now with a case of which I'm not sure if it can be fixed. In some units (SBHTTPCRL and SBHTTPCertRetriever, there are more) there is an AFactory created in the Initialization -> Register***Factory.

In the finalization -> Unregister***Factory this AFactory is removed from a list, but is it not freed.

To me it seems that there is no risk to also FreeAndNil this AFactory. Is that correct and if so can you change this in a future update?
Posted: 02/13/2013 08:58:24
by Eugene Mayevski (EldoS Corp.)

The risk is the same as with other global objects - if there exists a secondary thread, you would get an Access Violation before shutdown.

Sincerely yours
Eugene Mayevski



Topic viewed 413 times

Number of guests: 1, registered members: 0, in total hidden: 0


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!