Small formatting cleanup, before chi11ken notices. Me bad.

0.6.0-stable
Homer Horwitz 2008-09-19 21:32:41 +00:00
parent 6dd2841ed8
commit 025441d722
3 changed files with 39 additions and 20 deletions

View File

@ -107,19 +107,23 @@ namespace OpenSim.Data.SQLite
/// </summary> /// </summary>
public void Dispose() public void Dispose()
{ {
if(conn != null) { if (conn != null)
{
conn.Close(); conn.Close();
conn = null; conn = null;
} }
if(invItemsDa != null) { if (invItemsDa != null)
{
invItemsDa.Dispose(); invItemsDa.Dispose();
invItemsDa = null; invItemsDa = null;
} }
if(invFoldersDa != null) { if (invFoldersDa != null)
{
invFoldersDa.Dispose(); invFoldersDa.Dispose();
invFoldersDa = null; invFoldersDa = null;
} }
if(ds != null) { if (ds != null)
{
ds.Dispose(); ds.Dispose();
ds = null; ds = null;
} }
@ -500,7 +504,8 @@ namespace OpenSim.Data.SQLite
// Current folder already has a sibling - append to sibling list // Current folder already has a sibling - append to sibling list
hashtable[curFolder.ParentID].Add(curFolder); hashtable[curFolder.ParentID].Add(curFolder);
} }
else { else
{
List<InventoryFolderBase> siblingList = new List<InventoryFolderBase>(); List<InventoryFolderBase> siblingList = new List<InventoryFolderBase>();
siblingList.Add(curFolder); siblingList.Add(curFolder);
// Current folder has no known (yet) siblings // Current folder has no known (yet) siblings

View File

@ -205,44 +205,53 @@ namespace OpenSim.Data.SQLite
public void Dispose() public void Dispose()
{ {
if(m_conn != null) { if (m_conn != null)
{
m_conn.Close(); m_conn.Close();
m_conn = null; m_conn = null;
} }
if(ds != null) { if (ds != null)
{
ds.Dispose(); ds.Dispose();
ds = null; ds = null;
} }
if(primDa != null) { if (primDa != null)
{
primDa.Dispose(); primDa.Dispose();
primDa = null; primDa = null;
} }
if(shapeDa != null) { if (shapeDa != null)
{
shapeDa.Dispose(); shapeDa.Dispose();
shapeDa = null; shapeDa = null;
} }
if(itemsDa != null) { if (itemsDa != null)
{
itemsDa.Dispose(); itemsDa.Dispose();
itemsDa = null; itemsDa = null;
} }
if(terrainDa != null) { if (terrainDa != null)
{
terrainDa.Dispose(); terrainDa.Dispose();
terrainDa = null; terrainDa = null;
} }
if(landDa != null) { if (landDa != null)
{
landDa.Dispose(); landDa.Dispose();
landDa = null; landDa = null;
} }
if(landAccessListDa != null) { if (landAccessListDa != null)
{
landAccessListDa.Dispose(); landAccessListDa.Dispose();
landAccessListDa = null; landAccessListDa = null;
} }
if(regionSettingsDa != null) { if (regionSettingsDa != null)
{
regionSettingsDa.Dispose(); regionSettingsDa.Dispose();
regionSettingsDa = null; regionSettingsDa = null;
} }
} }
public void StoreRegionSettings(RegionSettings rs) public void StoreRegionSettings(RegionSettings rs)
{ {
lock (ds) lock (ds)

View File

@ -124,23 +124,28 @@ namespace OpenSim.Data.SQLite
public override void Dispose () public override void Dispose ()
{ {
if(g_conn != null) { if (g_conn != null)
{
g_conn.Close(); g_conn.Close();
g_conn = null; g_conn = null;
} }
if(ds != null) { if (ds != null)
{
ds.Dispose(); ds.Dispose();
ds = null; ds = null;
} }
if(da != null) { if (da != null)
{
da.Dispose(); da.Dispose();
da = null; da = null;
} }
if(daf != null) { if (daf != null)
{
daf.Dispose(); daf.Dispose();
daf = null; daf = null;
} }
if(dua != null) { if (dua != null)
{
dua.Dispose(); dua.Dispose();
dua = null; dua = null;
} }