From 6309fcc5b4b42102b5bb901dbbdf44846f5643f2 Mon Sep 17 00:00:00 2001 From: John Hurliman Date: Mon, 2 Nov 2009 11:19:55 -0800 Subject: Reverting the memory leak patch for MySQL. Problems have been reported with the grid server after running for several hours --- OpenSim/Data/MSSQL/AutoClosingSqlCommand.cs | 15 ++++++++++++--- OpenSim/Data/MSSQL/MSSQLInventoryData.cs | 2 ++ OpenSim/Data/MSSQL/MSSQLManager.cs | 4 ++++ OpenSim/Data/MSSQL/MSSQLMigration.cs | 1 + 4 files changed, 19 insertions(+), 3 deletions(-) (limited to 'OpenSim/Data/MSSQL') diff --git a/OpenSim/Data/MSSQL/AutoClosingSqlCommand.cs b/OpenSim/Data/MSSQL/AutoClosingSqlCommand.cs index 0e21880..93e48cd 100644 --- a/OpenSim/Data/MSSQL/AutoClosingSqlCommand.cs +++ b/OpenSim/Data/MSSQL/AutoClosingSqlCommand.cs @@ -197,11 +197,20 @@ namespace OpenSim.Data.MSSQL public void Dispose() { SqlConnection conn = realCommand.Connection; - try { realCommand.Dispose(); } + try + { + realCommand.Dispose(); + } finally { - try { conn.Dispose(); } - finally { } + try + { + conn.Close(); + } + finally + { + conn.Dispose(); + } } } diff --git a/OpenSim/Data/MSSQL/MSSQLInventoryData.cs b/OpenSim/Data/MSSQL/MSSQLInventoryData.cs index d49c2b3..1482184 100644 --- a/OpenSim/Data/MSSQL/MSSQLInventoryData.cs +++ b/OpenSim/Data/MSSQL/MSSQLInventoryData.cs @@ -348,6 +348,8 @@ namespace OpenSim.Data.MSSQL //Delete the actual row DeleteOneFolder(folderID, connection); DeleteItemsInFolder(folderID, connection); + + connection.Close(); } } diff --git a/OpenSim/Data/MSSQL/MSSQLManager.cs b/OpenSim/Data/MSSQL/MSSQLManager.cs index 992ce02..3d7a768 100644 --- a/OpenSim/Data/MSSQL/MSSQLManager.cs +++ b/OpenSim/Data/MSSQL/MSSQLManager.cs @@ -340,6 +340,8 @@ namespace OpenSim.Data.MSSQL MSSQLMigration migration = new MSSQLMigration(connection, assem, migrationStore); migration.Update(); + + connection.Close(); } } @@ -383,7 +385,9 @@ namespace OpenSim.Data.MSSQL m_log.Error(e.ToString()); } } + tables.Close(); } + } /// diff --git a/OpenSim/Data/MSSQL/MSSQLMigration.cs b/OpenSim/Data/MSSQL/MSSQLMigration.cs index 549bcb3..aea31c9 100644 --- a/OpenSim/Data/MSSQL/MSSQLMigration.cs +++ b/OpenSim/Data/MSSQL/MSSQLMigration.cs @@ -56,6 +56,7 @@ namespace OpenSim.Data.MSSQL { version = Convert.ToInt32(reader["version"]); } + reader.Close(); } } catch -- cgit v1.1