Skip to content

Glossary: Rust Beyond the Basics

Drop

Also written: drop

A trait whose `drop` method runs when a value goes away. Smart pointers use it to free memory; the `drop(value)` function ends a value early.

Where the book teaches it

Related terms

Derefsmart pointer