Interface ISafeComponentHandleProvider
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
TThe type of the component to retrieve.