##// END OF EJS Templates
fixed unpredictable Safe.Dispose behaviour
cin -
r238:bdfdba6b645b v2
parent child
Show More
@@ -7,7 +7,7 namespace Implab.Components {
7 7 /// </summary>
8 8 public class ServiceLocator: Disposable, IServiceLocator, IServiceProvider {
9 9 // запись о сервисе
10 struct ServiceEntry : IDisposable {
10 class ServiceEntry : IDisposable {
11 11 public object service; // сервис
12 12 public bool shared; // признак того, что сервис НЕ нужно освобождать
13 13 public Func<object> activator; // активатор сервиса при первом обращении
@@ -90,11 +90,9 namespace Implab
90 90 }
91 91
92 92 public static void Dispose(object obj) {
93 if (obj is IDisposable) {
93 if (obj is IDisposable)
94 94 Dispose((IDisposable)obj);
95 } else if (obj is IEnumerable) {
96 DisposeCollection((IEnumerable)obj);
97 }
95
98 96 }
99 97
100 98 [DebuggerStepThrough]
General Comments 3
Under Review
author

Auto status change to "Under Review"

Approved
author

ok, latest stable version should be in default

You need to be logged in to leave comments. Login now