From 29a4614529bbda02b9c690d2d1812be1d1e7bbae Mon Sep 17 00:00:00 2001 From: John Hurliman Date: Sun, 4 Oct 2009 13:57:51 -0700 Subject: * MySQL data tests now pass by fixing a bad fix for a bad cast on the asset Local member in MySQLAssetData * First pass at applying the using(){} pattern to IDisposable objects. Always use the using pattern on IDisposable objects whenever possible, do not manually call .Close() or .Dispose() unless there is no other way to write the code. This pass mostly covers OpenSim.Data.MySQL, and should have no functional change (tests still pass) --- OpenSim/Data/MSSQL/MSSQLManager.cs | 4 ---- 1 file changed, 4 deletions(-) (limited to 'OpenSim/Data/MSSQL/MSSQLManager.cs') diff --git a/OpenSim/Data/MSSQL/MSSQLManager.cs b/OpenSim/Data/MSSQL/MSSQLManager.cs index 3d7a768..992ce02 100644 --- a/OpenSim/Data/MSSQL/MSSQLManager.cs +++ b/OpenSim/Data/MSSQL/MSSQLManager.cs @@ -340,8 +340,6 @@ namespace OpenSim.Data.MSSQL MSSQLMigration migration = new MSSQLMigration(connection, assem, migrationStore); migration.Update(); - - connection.Close(); } } @@ -385,9 +383,7 @@ namespace OpenSim.Data.MSSQL m_log.Error(e.ToString()); } } - tables.Close(); } - } /// -- cgit v1.1