Xojo.Core.MemoryBlock.Constructor(size As UInteger)

From Xojo Documentation

Revision as of 17:29, 11 August 2019 by Gperlman (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Constructor

Xojo.Core.MemoryBlock.Constructor(size As UInteger)

Creates a MemoryBlock with the desired size in bytes.

Parameters

Parameter Description
size The size (in bytes) of the MemoryBlock to create. Size is either a 32-bit or 64-bit unsigned integer depending on the OS.

Exceptions

  • OutOfMemoryException if there is insufficient memory to allocate size bytes and there is sufficient memory to recover from this error.

Sample Code

Reserve 1K:

Var mb As New Xojo.Core.MemoryBlock(1024) // Reserve 1K bytes