(22) Since upgrading a project to use System.Data.SQLite version 1.0.82.0 (or later), the database file is still locked after all its connections have been closed. Why is this happening? As of version 1.0.82.0, the native resources for a SQLiteConnection object, including any native locks on the underlying file, are not fully released until all SQLiteCommand, SQLiteDataReader, SQLiteStatement, and SQLiteBackup objects associated with that SQLiteConnection object have also been disposed. These changes were made to allow the SQLite native resource management to integrate better with the garbage collection semantics used by the Common Language Runtime. Allowing native SQLite resources to be released in a non-deterministic order is accomplished through careful use of the sqlite3_close_v2() core native library routine
Обсуждают сегодня