mirror of
https://github.com/opensim/opensim.git
synced 2026-08-04 16:22:50 +08:00
- Add Dispose method to IRegionDataStore
- Add necessary dummy Dispose-methods where they are missing - Implement the SQLite Dispose-methods (currently only used for unit tests, in the next commit)
This commit is contained in:
@@ -46,6 +46,7 @@ namespace OpenSim.Data.SQLite
|
||||
private const string invItemsSelect = "select * from inventoryitems";
|
||||
private const string invFoldersSelect = "select * from inventoryfolders";
|
||||
|
||||
private SqliteConnection conn;
|
||||
private DataSet ds;
|
||||
private SqliteDataAdapter invItemsDa;
|
||||
private SqliteDataAdapter invFoldersDa;
|
||||
@@ -71,7 +72,7 @@ namespace OpenSim.Data.SQLite
|
||||
dbconnect = "URI=file:inventoryStore.db,version=3";
|
||||
}
|
||||
m_log.Info("[INVENTORY DB]: Sqlite - connecting: " + dbconnect);
|
||||
SqliteConnection conn = new SqliteConnection(dbconnect);
|
||||
conn = new SqliteConnection(dbconnect);
|
||||
|
||||
conn.Open();
|
||||
|
||||
@@ -101,6 +102,29 @@ namespace OpenSim.Data.SQLite
|
||||
ds.AcceptChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Closes the inventory interface
|
||||
/// </summary>
|
||||
public void Dispose()
|
||||
{
|
||||
if(conn != null) {
|
||||
conn.Close();
|
||||
conn = null;
|
||||
}
|
||||
if(invItemsDa != null) {
|
||||
invItemsDa.Dispose();
|
||||
invItemsDa = null;
|
||||
}
|
||||
if(invFoldersDa != null) {
|
||||
invFoldersDa.Dispose();
|
||||
invFoldersDa = null;
|
||||
}
|
||||
if(ds != null) {
|
||||
ds.Dispose();
|
||||
ds = null;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
@@ -277,13 +301,6 @@ namespace OpenSim.Data.SQLite
|
||||
// TODO: DataSet commit
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Closes the inventory interface
|
||||
/// </summary>
|
||||
public void Dispose()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The name of this DB provider
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user