Table of Contents

Interface ISafeComponentHandleProvider

Namespace
SampSharp.Entities
Assembly
SampSharp.OpenMp.Entities.dll

Provides handles to open.mp components which are automatically cleared when the component is freed. This allows for safe access to components without risking access to freed components, which can lead to crashes or undefined behavior.

public interface ISafeComponentHandleProvider

Methods

Get<T>()

Retrieves a handle to a component of the specified type.

SafeComponentHandle<T> Get<T>() where T : unmanaged, IComponent.IManagedInterface

Returns

SafeComponentHandle<T>

A SafeComponentHandle<T> representing a handle to the requested component. The handle will be cleared when the open.mp component is freed.

Type Parameters

T

The type of the component to retrieve.