Assets/Plugins/Unity.Media.Utilities/Runtime/AtomicFreeList.cs
/// <summary>
/// Acquires a new element from the free list.
/// If no elements are available, or the allocation mode is ephemeral, a new element is allocated.
/// </summary>
/// <returns>A "new" element</returns>
Acquires a new element from the free list.
If no elements are available, or the allocation mode is ephemeral, a new element is allocated.
Acquires a new element from the free list . If no elements are available or the allocation mode is ephemeral a new element is allocated .
public T* Acquire()
        {
            if (m_AllocationMode == AllocationMode.Ephemeral)
                return Utility.AllocateUnsafe<T>(1,  Allocator.TempJob);
            var node = PopFromFreeList();
            if (node == null)
                return Utility.AllocateUnsafe<T>(1,  m_Allocator);
            return (T*)node;
        }
public T * Acquire ( ) { if ( m_AllocationMode == AllocationMode . Ephemeral ) return Utility . AllocateUnsafe < T > ( 1 , Allocator . TempJob ) ; var node = PopFromFreeList ( ) ; if ( node == null ) return Utility . AllocateUnsafe < T > ( 1 , m_Allocator ) ; return ( T * ) node ; }
Acquires a new element from the free list.
Acquires a new element from the free list .
A "new" element
A " new " element