[yunqa.de] Re: DISQLite and sqlite3MemoryBarrier() implementation

  • From: Delphi Inspiration <delphi@xxxxxxxx>
  • To: yunqa@xxxxxxxxxxxxx
  • Date: Thu, 22 Oct 2015 18:07:09 +0200

On 22.10.2015 16:42, Luigi Sandon wrote:

Unluckily the code is deep down in a heavily multithreaded
applications which opens two SQLite databases at the same time -
don't know if this is the reason.

Tough debugging.

Are you running sqlite3_initialize() prior to opening any database? If
not, does help it help if you do?

sqlite3_initialize() is otherwise called implicitly when first opening a
database. This should not conflict, but calling sqlite3_initialize() in
the main thread may be worth trying if your application "opens two
SQLite databases at the same time".

The counterpart is sqlite3_shutdown(), which you should also run in the
main thread after all databases are closed. A good place is before
application close to avoid memory leaks.

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



Other related posts: