diff Implab/Components/LazyAndWeak.cs @ 182:76e8f2ba12b8 ref20160224

pretty print DFA, the minimization is still buggy
author cin
date Thu, 24 Mar 2016 18:52:10 +0300
parents c32688129f14
children 3a6e18c432be
line wrap: on
line diff
--- a/Implab/Components/LazyAndWeak.cs	Thu Mar 24 03:54:46 2016 +0300
+++ b/Implab/Components/LazyAndWeak.cs	Thu Mar 24 18:52:10 2016 +0300
@@ -7,7 +7,7 @@
     /// </summary>
     /// <remarks>
     /// Usefull when dealing with memory-intensive objects which are frequently used.
-    /// This class is similar to <see cref="ObjectPool{T}"/> except is a singleton.
+    /// This class is similar to <see cref="ObjectPool{T}"/> except it is a singleton.
     /// </remarks>
     public class LazyAndWeak<T> where T : class {
 
@@ -44,6 +44,7 @@
                     } else {
                         lock (m_lock) {
                             // double check
+                            weak = m_reference;
                             if (weak != null) {
                                 value = weak.Target as T;
                                 if (value != null)