Skip to content

Commit

Permalink
Improve wording around drop
Browse files Browse the repository at this point in the history
Technically box is still special so this is in the compiler, not in a Drop impl.

Fixes #2260
  • Loading branch information
steveklabnik authored Jun 1, 2020
1 parent e4018f2 commit 73616ce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ch15-03-drop.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ provide an implementation for the `Drop` trait on any type, and the code you
specify can be used to release resources like files or network connections.
We’re introducing `Drop` in the context of smart pointers because the
functionality of the `Drop` trait is almost always used when implementing a
smart pointer. For example, `Box<T>` customizes `Drop` to deallocate the space
smart pointer. For example, when a `Box<T>` is dropped it will deallocate the space
on the heap that the box points to.

In some languages, the programmer must call code to free memory or resources
Expand Down

0 comments on commit 73616ce

Please sign in to comment.