comparison Implab/Components/LazyAndWeak.cs @ 264:3a6e18c432be v3

Added XmlToJson xsl transformation. Added JsonXmlReader.CreateJsonXmlReader(...) methods Added SerializationHelpers.SerializeJson/DeserializeJson methods
author cin
date Mon, 16 Apr 2018 18:43:49 +0300
parents 76e8f2ba12b8
children
comparison
equal deleted inserted replaced
263:711572866e0c 264:3a6e18c432be
6 /// Creates an instace on-demand and allows it to be garbage collected. 6 /// Creates an instace on-demand and allows it to be garbage collected.
7 /// </summary> 7 /// </summary>
8 /// <remarks> 8 /// <remarks>
9 /// Usefull when dealing with memory-intensive objects which are frequently used. 9 /// Usefull when dealing with memory-intensive objects which are frequently used.
10 /// This class is similar to <see cref="ObjectPool{T}"/> except it is a singleton. 10 /// This class is similar to <see cref="ObjectPool{T}"/> except it is a singleton.
11 /// This class can't be used to hold diposable objects.
11 /// </remarks> 12 /// </remarks>
12 public class LazyAndWeak<T> where T : class { 13 public class LazyAndWeak<T> where T : class {
13 14
14 readonly Func<T> m_factory; 15 readonly Func<T> m_factory;
15 readonly object m_lock; 16 readonly object m_lock;