Version: Unity 6.7 Beta (6000.7)
LanguageEnglish
  • C#

AllocatorManager.Free

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Declaration

public static void Free(AllocatorHandle handle, void* pointer, int itemSizeInBytes, int alignmentInBytes, int items);

Parameters

Parameter Description
handle A handle to the allocator.
pointer A pointer to the allocated memory.
itemSizeInBytes The size in bytes of the allocation.
alignmentInBytes The alignment in bytes (must be a power of two).
items The number of values that the memory was allocated for.

Description

Frees an allocation.

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 itemSizeInBytes, alignmentInBytes and items.


Declaration

public static void Free(AllocatorHandle handle, void* pointer);

Parameters

Parameter Description
handle A handle to the allocator.
pointer A pointer to the allocated memory.

Description

Frees an allocation.


Declaration

public static void Free(AllocatorHandle handle, T* pointer, int items);

Parameters

Parameter Description
handle A handle to the allocator.
pointer A pointer to the allocated memory.
items The number of values that the memory was allocated for.

Description

Frees an allocation.

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 T and items.