Exemplo n.º 1
0
 public void Dispose()
 {
     if (!Disposed)
     {
         reference.Release();
         reference = null;
     }
 }
Exemplo n.º 2
0
 public void Reset(T reference)
 {
     if (!Disposed)
     {
         Dispose();
     }
     this.reference = new InternalSharedRef(reference);
 }
Exemplo n.º 3
0
 public SharedRef(SharedRef <T> source)
 {
     if (source == null)
     {
         throw new ArgumentNullException("source");
     }
     this.reference = source.reference;
     this.reference.Retain();
 }
Exemplo n.º 4
0
 public SharedRef(T reference)
 {
     this.reference = new InternalSharedRef(reference);             // refcount is 1
 }