コード例 #1
0
 SharedRef(SharedRef <T> other)
 {
     reference = other.reference;
     cd        = other.cd;
     cd.AddCount();
 }
コード例 #2
0
 /// <summary>
 /// Creates a new shared reference by releasing the array from the given <see cref="UniqueRef{T}"/>.
 /// </summary>
 /// <param name="t">The unique ref that owns the array. Ownership will be removed from this value.</param>
 public SharedRef(UniqueRef <T> t)
 {
     reference = t.Release();
     cd        = new CountdownEvent(1);
 }