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

From Xojo Documentation

Revision as of 14:53, 24 August 2018 by PLefebvre (talk | contribs) (Created page with "{{ConstructorBox | name=Constructor | owner=Xojo.Core.MemoryBlock | ownertype=class | scope=public | parameters=size As UInteger }} {{Description | text = Creates a Me...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


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

Creates a MemoryBlock with the desired size in bytes.


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.


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

Sample Code

Reserve 1K:

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