Interbase.ForceUnloadClientLibrary

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
FredS
Posts: 272
Joined: Mon 10 Nov 2014 17:52

Interbase.ForceUnloadClientLibrary

Post by FredS » Wed 08 Dec 2021 16:47

Since I was running 'Process Explorer' to see if zlib was loaded for compression I noticed that the app had two versions of 'fbclient.dll' loaded. One from the embedded folder which was loaded during startup and another from the system folder which was used after I changed db connections.

Both the main connection and test connection have 'Interbase.ForceUnloadClientLibrary=True' and have been double checked via Asserts..

Another SpecificOptions which is missing from the ConnectionString?

FredS
Posts: 272
Joined: Mon 10 Nov 2014 17:52

Re: Interbase.ForceUnloadClientLibrary

Post by FredS » Wed 08 Dec 2021 17:23

FbClient is still loaded even after switching to MSSQL..

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: Interbase.ForceUnloadClientLibrary

Post by ViktorV » Fri 10 Dec 2021 17:04

Hi Fred,

Kindly be informed that this is the correct UniDAC behavior when working with an InterBase provider. The client libraries which are used in the application will be loaded until the TGDSList.Clear method is called, which in turn is automatically executed in the finalization section of the IBCCallUni.pas module.
But please note that you can always execute the GDSList.Clear method by yourself in your application.

Please, let us know if you have any questions.

FredS
Posts: 272
Joined: Mon 10 Nov 2014 17:52

Re: Interbase.ForceUnloadClientLibrary

Post by FredS » Fri 10 Dec 2021 17:42

From your help file:
ForceUnloadClientLibrary Use the option to force unloading of the client library after the connection is closed. The default value is False.
Plus I'm pretty sure that is how it worked before..

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: Interbase.ForceUnloadClientLibrary

Post by ViktorV » Fri 17 Dec 2021 17:09

Hi Fred!

Thanks for the info!

We will make changes to the Help file.
Please indicate on which version of UniDAC there was a different behavior - we will try to give you a more complete and accurate answer.


Regards,
Viktor

FredS
Posts: 272
Joined: Mon 10 Nov 2014 17:52

Re: Interbase.ForceUnloadClientLibrary

Post by FredS » Fri 17 Dec 2021 20:35

Maybe one should wonder what an Option named ForceUnloadClientLibrary with a matching description in the help does?

As for when did it work, shortly after you implemented it. One usually only checks these things once..

FredS
Posts: 272
Joined: Mon 10 Nov 2014 17:52

Re: Interbase.ForceUnloadClientLibrary

Post by FredS » Mon 20 Dec 2021 23:17

I should probably add that this was way before Pooling..

Anyhow, with Pooling=OFF both libraries where still loaded.

I already had a method that called GetConnectionPoolingManagerClass.Clear while all Connections where closed to allow updating the EXE on the fly. Adding GDSList.Clear to that method now unloads the libraries nicely.

Thanks..

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: Interbase.ForceUnloadClientLibrary

Post by ViktorV » Fri 24 Dec 2021 14:29

We are glad to hear that you have found solutions to this issue. Thank you for your interest in our products. Feel free to contact us if you have any questions.

Post Reply