Abstract class that grants read/write access to a chunk of fast "alchemy memory".

Variables

read onlybytes:Int

The number of allocated bytes.

@:value(HashKey.next())read onlykey:Int = HashKey.next()

A unique identifier for this object. A hash table transforms this key into an index of an array element by using a hash function.

name:String

read onlyoffset:Int

The memory offset in bytes.

Methods

clear ():Void

Sets all bytes to 0.

free ():Void

Destroys this object by explicitly nullifying all pointers and instantly releases any memory that was allocated by this accessor. Invoke this method when the life cycle of this object ends to prevent a memory leak. This is not optional if MemoryManager.AUTO_RECLAIM_MEMORY is true.

resize (byteSize:Int):Void

Resizes the memory to byteSize bytes.