Basic module

set_temporary_storage_mark

procedureSource

Rewinds temporary storage to state, a value from get_temporary_storage_mark. Everything allocated since then is gone.

set_temporary_storage_mark :: (
    state: Temporary_Storage_State,
    loc := #caller_location
)

Parameters

loc := #caller_location
Example↗
mark := get_temporary_storage_mark();
scratch := tprint("%", 12345);
assert(scratch == "12345");
set_temporary_storage_mark(mark);

See also