Ejemplo n.º 1
0
 /// <summary>
 /// Decrements the usage counter of this segment.
 /// </summary>
 /// <remarks>When the usage counter reaches 0, the segment will be
 /// returned to the buffer pool.</remarks>
 public void DecrementUsage()
 {
     if (Interlocked.Decrement(ref m_uses) == 0)
     {
         Buffer.CheckIn(this);
     }
 }
Ejemplo n.º 2
0
 /// <summary>Decrements the usage counter of this segment.</summary>
 /// <remarks>When the usage counter reaches 0, the segment will be
 /// returned to the buffer pool.</remarks>
 public void DecrementUsage()
 {
     if (Interlocked.Decrement(ref m_uses) != 0)
     {
         return;
     }
     Buffer.CheckIn(this);
 }