IRef<T> Interface

Summary

A ref-counted wrapper for a disposable object.
Namespace
Avalonia.Utilities
Interfaces
  • IDisposable
graph BT Type-.->Interface0["IDisposable"] Type["IRef<T>"] class Type type-node

Syntax

public interface IRef<out T> : IDisposable where T : class

Type Parameters

Name Description
T

Properties

Name Value Summary
Item T
The item that is being ref-counted.
RefCount int
The current refcount of the object tracked in this reference. For debugging/unit test use only.

Methods

Name Value Summary
Clone() IRef<T>
Create another reference to this object and increment the refcount.
CloneAs<TResult>() IRef<TResult>
Create another reference to the same object, but cast the object to a different type.