[mono/mono] [2 commits] c749da6d: System.CompomentModel.Component.cs: Make disposedEvent key static

"Marek Safar ([email protected])" <[email protected]> Sun, 10 Nov 2013 08:12:48 +0000
Newsgroups gmane.comp.gnome.mono.patches
Message-ID <000001424112006d-ed188bad-f8d4-45b6-b2ec-b0070687453a-000000@email.amazonses.com>
   Branch: refs/heads/master
     Home: https://github.com/mono/mono
  Compare: https://github.com/mono/mono/compare/a571d294992d...25a3e0e4b843

   Commit: c749da6d02a2b63b973d6da23f0fa379d9128aa6
   Author: Alex Willmy <[email protected]> (Wolpertinger)
     Date: 2013-11-09 16:49:12 GMT
      URL: https://github.com/mono/mono/commit/c749da6d02a2b63b973d6da23f0fa379d9128aa6

System.CompomentModel.Component.cs: Make disposedEvent key static

There is no need for an instance of Component to create its own lookup key for the Disposed event. Use a shared static key instead.

Changed paths:
  M mcs/class/System/System.ComponentModel/Component.cs

Modified: mcs/class/System/System.ComponentModel/Component.cs
===================================================================
@@ -44,7 +44,7 @@ public class Component : MarshalByRefObject, IComponent, IDisposable
 
 		private EventHandlerList event_handlers;
 		private ISite mySite;
-		private object disposedEvent = new object ();
+		static readonly object disposedEvent = new object ();
 
 		public Component ()
 		{

   Commit: 25a3e0e4b8434f7a358749eab46318df6a78f64f
   Author: Marek Safar <[email protected]> (marek-safar)
     Date: 2013-11-10 08:10:43 GMT
      URL: https://github.com/mono/mono/commit/25a3e0e4b8434f7a358749eab46318df6a78f64f

Merge pull request #803 from Wolpertinger/patch-1

System.CompomentModel.Component.cs: Make disposedEvent key static

Changed paths:
  M mcs/class/System/System.ComponentModel/Component.cs

Modified: mcs/class/System/System.ComponentModel/Component.cs
===================================================================
@@ -44,7 +44,7 @@ public class Component : MarshalByRefObject, IComponent, IDisposable
 
 		private EventHandlerList event_handlers;
 		private ISite mySite;
-		private object disposedEvent = new object ();
+		static readonly object disposedEvent = new object ();
 
 		public Component ()
 		{


_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches