List:Commits« Previous MessageNext Message »
From:rburnett Date:October 23 2006 9:30pm
Subject:Connector/NET commit: r432 - branches/1.0/mysqlclient
View as plain text  
Modified:
   branches/1.0/mysqlclient/MySqlPoolManager.cs
Log:
MySqlPoolManager - implemented a suggested fix from a  user.  The user suggested
instantiating the hashtable in place.  This was done a slightly different way by making
the class a static class, adding a static ctor, and instantiating the hashtable there.

Modified: branches/1.0/mysqlclient/MySqlPoolManager.cs
===================================================================
--- branches/1.0/mysqlclient/MySqlPoolManager.cs	2006-10-23 19:29:44 UTC (rev 431)
+++ branches/1.0/mysqlclient/MySqlPoolManager.cs	2006-10-23 19:30:13 UTC (rev 432)
@@ -27,28 +27,17 @@
 	/// <summary>
 	/// Summary description for MySqlPoolManager.
 	/// </summary>
-	internal sealed class MySqlPoolManager
+	internal static class MySqlPoolManager
 	{
 		private static Hashtable pools;
 
-		public MySqlPoolManager()
+		static MySqlPoolManager()
 		{
-		}
-
-		/// <summary>
-		/// 
-		/// </summary>
-		private static void Initialize()
-		{
 			pools = new Hashtable();
 		}
 
 		public static MySqlPool GetPool(MySqlConnectionString settings)
 		{
-			// make sure the manager is initialized
-			if (MySqlPoolManager.pools == null)
-				MySqlPoolManager.Initialize();
-
 			string text = settings.GetConnectionString(true);
 
 			lock (pools.SyncRoot)

Thread
Connector/NET commit: r432 - branches/1.0/mysqlclientrburnett23 Oct