Class RefCount<T>
Manages reference counting for a given object. Extensions can override Release() to do custom logic when reference counting hits 0.
Inheritance
System.Object
RefCount<T>
Assembly: DistributedLucene.Net.dll
Syntax
public class RefCount<T> : object
Type Parameters
Name | Description |
---|---|
T |
Constructors
Name | Description |
---|---|
RefCount(T) |
Fields
Name | Description |
---|---|
m_object |
Methods
Name | Description |
---|---|
DecRef() | Decrements the reference counting of this object. When reference counting hits 0, calls Release(). |
Get() | |
GetRefCount() | Returns the current reference count. |
IncRef() | Increments the reference count. Calls to this method must be matched with calls to DecRef(). |
Release() | Called when reference counting hits 0. By default this method does nothing, but extensions can override to e.g. release resources attached to object that is managed by this class. |