Struct arena::TypedArena
pub struct TypedArena<T> { // some fields omitted }
An arena that can hold objects of only one type.
Safety note: Modifying objects in the arena that have already had their
drop
destructors run can cause leaks, because the destructor will not
run again for these objects.
Methods
impl<T> TypedArena<T>
fn new() -> TypedArena<T>
Creates a new arena with preallocated space for 8 objects.
fn with_capacity(capacity: uint) -> TypedArena<T>
Creates a new arena with preallocated space for the given number of objects.
fn alloc<'a>(&'a self, object: T) -> &'a T
Allocates an object into this arena.