EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Free AFactory on Unregister***Factory

Posted: 02/13/2013 08:54:01
by Birger Jansen (Standard support level)
Joined: 07/19/2012
Posts: 80

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 (Team)

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 465 times

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


Back to top

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

Got it!