diff Implab/Components/App.cs @ 153:b933ec88446e v2

docs
author cin
date Fri, 12 Feb 2016 00:59:29 +0300
parents 240aa6994018
children
line wrap: on
line diff
--- a/Implab/Components/App.cs	Thu Feb 11 01:56:27 2016 +0300
+++ b/Implab/Components/App.cs	Fri Feb 12 00:59:29 2016 +0300
@@ -8,12 +8,17 @@
     public static class App {
         readonly static ComponentContainer<object> _root = new ComponentContainer<object>();
 
+        /// <summary>
+        /// The container for application level components.
+        /// </summary>
+        /// <remarks>Pools of disposable objects can be placed here and they will be automatically
+        /// disposed when application domain is unloaded.</remarks>
         public static ICollection<object> RootContainer {
             get { return _root; }
         }
 
         static App() {
-            AppDomain.CurrentDomain.ProcessExit += (sender, e) => _root.Dispose();
+            AppDomain.CurrentDomain.DomainUnload += (sender, e) => _root.Dispose();
         }
     }
 }