Conceptual
Login

The Box Smart Pointer

Box<T> is an owned pointer to a single heap allocation, freed when the Box is dropped. It gives fixed-size handles to unsized or recursive types (trait objects, recursive enums) and costs exactly one pointer on the stack.

This Concept is waiting for its first lesson!

Box<T> is an owned pointer to a single heap allocation, freed when the Box is dropped. It gives fixed-size handles to unsized or recursive types (trait objects, recursive enums) and costs exactly one pointer on the stack.

Are you a teacher? Sign in to start contributing.

Sign In