Show / Hide Table of Contents

Interface IReference<T>

Represents an interface for managing references to unmanaged objects that must be disposed, such as FFmpeg objects, without requiring the implementing struct to handle disposal directly.

Namespace: FFmpeg.Utils
Assembly: FFmpeg.dll
Syntax
public interface IReference<T> where T : class, IDisposable
Type Parameters
Name Description
T

The type of the referenced object, which must implement IDisposable.

Methods

View Source

GetReferencedObject()

Gets the object currently being referenced. Or a copy if the type is nor reference counted.

Declaration
T? GetReferencedObject()
Returns
Type Description
T

The referenced object of type T if available, or null if not.

View Source

SetReferencedObject(T?)

Sets the reference to a new object of type T or creates a copy if the type is not reference counted or unlinks the current reference.

Declaration
void SetReferencedObject(T? obj)
Parameters
Type Name Description
T obj

The new object to reference, or null to release the reference.

  • View Source
In this article
Back to top Generated by DocFX