文档

Unity Engine

Unity Engine

UnsafeScratchAllocator

A fixed-size buffer from which you can make allocations.
阅读时间1 分钟最后更新于 1 个月前

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.