[yunqa.de] Re: DISQLite3 ver. 1.6.1 memory leak

  • From: "Radovan Antloga" <radovan.antloga@xxxxxxxx>
  • To: <yunqa@xxxxxxxxxxxxx>
  • Date: Tue, 12 Aug 2008 23:15:39 +0200

If I understand how sqlite3_shutdown works I think you can explicitly call it with no harm in DISQLite3Api finalization section. I would not use sqlite3_initialize in DISQLite3Api initialize section as you explained why not. I use sqlite3_shutdown in DISQLite3Database finalization section with no problems even if library did not call sqlite3_initialize.


Regards,
Radovan

----- Original Message ----- From: "Delphi Inspiration" <delphi@xxxxxxxx>
To: <yunqa@xxxxxxxxxxxxx>
Sent: Tuesday, August 12, 2008 10:17 PM
Subject: [yunqa.de] Re: DISQLite3 ver. 1.6.1 memory leak


Radovan Antloga wrote:

So I think it will be confusing to other DISQLite3
users. I have changed DISQLite3Database.pas
with

finalization
DISQLite3Api.sqlite3_shutdown;

Maybe you could consider do something like this.

I did consider this adding sqlite3_shutdown to the DISQLite3Api finalization section, but refrained from doing so. It would make true sense only if sqlite3_initialize was previously called. The corresponding place to do so would be the DISQLite3Api initialize section. However, this would disallow users to tweak DISQLite3 by calling sqlite3_config, which only works on an uninitialized DISQLite3. It would also not allow to postpone initialization until applications actually start using DISQLite3.

So far the transition to DISQLite3 went smoothly. The change has been spelled out clearly in the DISQLite3 history which everyone should read before upgrading to new versions. I also adjusted all demos accordingly so new users will be accustomed with the new behavior right from the start.

Btw: I just noticed that the "Native API Overview" does not yet mention sqlite3_shutdown. I will add the missing information before the next release.

Ralf

_______________________________________________
Delphi Inspiration mailing list
yunqa@xxxxxxxxxxxxx
//www.freelists.org/list/yunqa

_______________________________________________
Delphi Inspiration mailing list
yunqa@xxxxxxxxxxxxx
//www.freelists.org/list/yunqa



Other related posts: