Skip to content

TrackedObject<T>

Namespace: Hex1b

Assembly: Hex1b.dll

A reference-counted wrapper for objects tracked by terminal cells.

csharp
public sealed class TrackedObject<T> where T : class

Inheritance

ObjectTrackedObject<T>

Properties

Data

Gets the tracked data.

Returns: <T>

csharp
public T Data { get; }

RefCount

Gets the current reference count.

Returns: Int32

csharp
public int RefCount { get; }

Methods

AddRef()

Adds a reference to this object.

csharp
public void AddRef()

Release()

Releases a reference. If refcount reaches zero, invokes the removal callback.

Returns: Boolean

True if this was the last reference and the object was removed.

csharp
public bool Release()

Remarks

When a tracked object's reference count reaches zero, it automatically removes itself from its parent store via the removal callback.

Released under the MIT License.