Skip to main content

$bufferAllocUnsafe

Creates a new Buffer instance with the specified number of bytes, and sets it to a variable without initializing the memory.

Parameters

ParameterDescription
nameThe name of the variable to set the buffer
bytesThe number of bytes for the buffer

Example

<AoiClient>.addCommand({
name: "create-buffer-unsafe",
code: `
$bufferAllocUnsafe[myBuffer; 1024]
`,
});