Free
Frees an allocation.
Read time 1 minuteLast updated 10 days ago
Definition
- Type: Method
- Namespace: Unity.Collections
- Assembly: UnityEngine.ManagedKernelModule
Free(AllocatorHandle, void*, int, int, int)
Frees an allocation.
public static void Free(AllocatorManager.AllocatorHandle handle, void* pointer, int itemSizeInBytes, int alignmentInBytes, int items = 1)
Parameters
A handle to the allocator.
A pointer to the allocated memory.
The size in bytes of the allocation.
The alignment in bytes (must be a power of two).
The number of values that the memory was allocated for.
Remarks
For some allocators, the size of the allocation must be known to properly deallocate. Other allocators only need the pointer when deallocating and so will ignore , and .
itemSizeInBytesalignmentInBytesitemsFree(AllocatorHandle, void*)
Frees an allocation.
public static void Free(AllocatorManager.AllocatorHandle handle, void* pointer)
Parameters
Free<T>(AllocatorHandle, `<>*, int)
Frees an allocation.
public static void Free<T>(AllocatorManager.AllocatorHandle handle, T* pointer, int items = 1) where T : unmanaged
Parameters
A handle to the allocator.
A pointer to the allocated memory.
The number of values that the memory was allocated for.
Remarks
For some allocators, the size of the allocation must be known to properly deallocate. Other allocators only need the pointer when deallocating and so will ignore and .
Titems