Thank you Joe, What was the motivation for this change (it seems to be quite inconvenient in my case)?
- Levi ----- Original Message ----- From: sql...@mistachkin.com To: sqlite-users@sqlite.org Cc: Levi Haskell (BLOOMBERG/ 731 LEXIN) At: Apr 25 2013 15:07:54 As of release 1.0.82.0, the object disposal semantics were changed to keep the underlying connection around until all associated System.Data.SQLite objects have been properly disposed. Levi Haskell wrote: > > var file = Path.GetTempFileName(); > using (var connection = new SQLiteConnection("Data Source=" + file)) > { > Console.WriteLine(connection.GetType().Assembly.FullName); > connection.Open(); > > var command = connection.CreateCommand(); > command.CommandText = "CREATE TABLE t(a)"; > command.ExecuteNonQuery(); > } > // the following line succeeds in v1.0.81.0 and earlier but > // FAILS on v1.0.82.0 and later with "file still in use" error > File.Delete(file); > In the above example, adding "command.Dispose();" just prior to the end of the using block should allow the file to be deleted. > > Was this change made by design? > Yes. -- Joe Mistachkin _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users