Struct UnsafeScratchAllocator
A fixed-size buffer from which you can make allocations.
Namespace: Unity.Collections.LowLevel.Unsafe
Assembly: solution.dll
Syntax
public struct UnsafeScratchAllocator
Remarks
Allocations from a scratch allocator are not individually deallocated. Instead, when you're done using all the allocations from a scratch allocator, you dispose the allocator as a whole.
Constructors
Name | Description |
---|---|
UnsafeScratchAllocator(void*, int) | Initializes and returns an instance of UnsafeScratchAllocator. |
Methods
Name | Description |
---|---|
Allocate(int, int) | Returns an allocation from the allocator's internal buffer. |
Allocate<T>(int) | Returns an allocation from the allocator's internal buffer. |