API reference
API reference
Select your platform
No SDKs available
No versions available

OVRObjectPool Class

Helper class to handle generic class object pools and avoid allocations in the SDK that would lead to garbage collection.

Static Member Functions

Gets an object of type T from it's respective pool.
If none is available a new one is created.
Returns
Object of type T
static List< T > List< T > ( )
static List< T > List< T >
( IEnumerable< T > source )
static Dictionary< TKey, TValue > Dictionary< TKey, TValue > ( )
static HashSet< T > HashSet< T > ( )
static Stack< T > Stack< T > ( )
static Queue< T > Queue< T > ( )
Returns an object of type T to it's respective pool.
If the object is null or already present in the pool no changes are made.After returning an object to the object pool using it is not allowed and leads to undefined behaviour, please Get<T> another object from the pool instead.
static void Return< T >
( HashSet< T > set )
static void Return< T >
( Stack< T > stack )
static void Return< T >
( Queue< T > queue )
Did you find this page helpful?
Thumbs up icon
Thumbs down icon