struct UnsafeReference
(Niantic.Lightship.Maps.Builders.Performance.NativeFeatures.UnsafeReference)
Overview
A single unmanaged value
template <T>
struct UnsafeReference:
INativeDisposable,
IEquatable< UnsafeReference< T >> {
- struct [DisposeJob]($mstruct_niantic_1_1_lightship_1_1_maps_1_1_builders_1_1_performance_1_1_native_features_1_1_unsafe_reference_1_1_dispose_job)
// properties
T Value;
// methods
UnsafeReference(T initialValue);
UnsafeReference(ref T initialValue);
void Dispose();
JobHandle Dispose(JobHandle dependencies);
bool Equals(UnsafeReference<T> other);
override bool Equals(object obj);
override int GetHashCode();
};
Detailed Documentation
A single unmanaged value
Functionally equivalent to an array of length 1. When you need just one value, UnsafeReference can be preferable to an UnsafeList<T> because it better conveys the intent
Parameters:
T
- The type of value
Methods
UnsafeReference
UnsafeReference(T initialValue)
Constructor
Parameters:
initialValue
- The initial value to store
UnsafeReference
UnsafeReference(ref T initialValue)
Constructor
Parameters:
initialValue
- The initial value to store
Dispose
void Dispose()
Releases resources used by this UnsafeReference<T>
Dispose
JobHandle Dispose(JobHandle dependencies)
Schedules a Job which releases any resources