Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


UnsafeScratchAllocator

A fixed-size buffer from which you can make allocations.
Read time 1 minuteLast updated 12 days ago

Definition

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

Constructor

Description

UnsafeScratchAllocator(System.Void*,System.Int32)Initializes and returns an instance of UnsafeScratchAllocator.

Methods

Method

Description

AllocateReturns an allocation from the allocator's internal buffer.