Table of Contents

Interface IReferenceable

Namespace
VAST.Common
Assembly
VAST.Common.dll

Defines the contract for objects that support reference counting.

public interface IReferenceable : IDisposable
Inherited Members

Remarks

Implementers must track the number of references to the object. When the reference count reaches zero, the object should be disposed. This interface extends IDisposable.

Properties

IsDisposed

Gets a value indicating whether the object has been disposed and can no longer be used.

bool IsDisposed { get; }

Property Value

bool

RefCount

Gets the current reference count of the object.

int RefCount { get; }

Property Value

int

Methods

AddRef()

Increments the reference count by one.

void AddRef()

Release()

Decrements the reference count by one.

void Release()

Remarks

If the reference count reaches zero, the Dispose() method is called. The caller must not use the object after calling this method.