union ResetMode [src]

Fields

free_allReleases all allocated memory in the arena.
retain_capacityThis will pre-heat the arena for future allocations by allocating a large enough buffer for all previously done allocations. Preheating will speed up the allocation process by invoking the backing allocator less often than before. If reset() is used in a loop, this means that after the biggest operation, no memory allocations are performed anymore.
retain_with_limit: usizeThis is the same as retain_capacity, but the memory will be shrunk to this value if it exceeds the limit.

Source

pub const ResetMode = union(enum) { /// Releases all allocated memory in the arena. free_all, /// This will pre-heat the arena for future allocations by allocating a /// large enough buffer for all previously done allocations. /// Preheating will speed up the allocation process by invoking the backing allocator /// less often than before. If `reset()` is used in a loop, this means that after the /// biggest operation, no memory allocations are performed anymore. retain_capacity, /// This is the same as `retain_capacity`, but the memory will be shrunk to /// this value if it exceeds the limit. retain_with_limit: usize, }