Struct arena::TypedArena[src]
pub struct TypedArena<T> {
// some fields omitted
}A faster 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 TypedArena with preallocated space for 8 objects.
fn with_capacity(capacity: uint) -> TypedArena<T>
Creates a new TypedArena with preallocated space for the given number of objects.
fn alloc<'a>(&'a self, object: T) -> &'a T
Allocates an object in the TypedArena, returning a reference to it.