manuallyDestroyVariable (object --)

Inputs

Outputs

manuallyDestroyVariable is a designated-storage destruction builtin. It destroys an object in existing storage. Storage release or storage reuse is a separate operation. For a non-static, non-callable In-place local or field, NAME or .NAME and @NAME or .@NAME all designate the same storage for manual destruction; see selection.

Behavior

Example

"String"           use
"memory.mplMalloc" use

Tracer: {
  value: 0;
  INIT: [
    ("init\n") printList
    42 !value
  ];
  DIE: [
    ("die\n") printList
  ];
};

{} 0 {} [
  slot: Tracer storageSize mplMalloc @Tracer addressToReference;
  @slot manuallyInitVariable
  ("-- value -- " slot.value "\n") printList
  slot manuallyDestroyVariable
  0
] "main" exportFunction

Expected Output

init
-- value -- 42
die

See also