Skip to content

Commit

Permalink
Fix typo
Browse files Browse the repository at this point in the history
Thanks apdapreturns
  • Loading branch information
steveklabnik committed May 13, 2015
1 parent 222cd73 commit 22eb466
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/doc/trpl/the-stack-and-the-heap.md
Expand Up @@ -266,7 +266,7 @@ Rust programs use [jemalloc][jemalloc] for this purpose.
Anyway, back to our example. Since this memory is on the heap, it can stay
alive longer than the function which allocates the box. In this case, however,
it doesn’t.[^moving] When the function is over, we need to free the stack frame
for `main()`. `Box<T>`, though, has a trick up its sleve: [Drop][drop]. The
for `main()`. `Box<T>`, though, has a trick up its sleeve: [Drop][drop]. The
implementation of `Drop` for `Box` deallocates the memory that was allocated
when it was created. Great! So when `x` goes away, it first frees the memory
allocated on the heap:
Expand Down

0 comments on commit 22eb466

Please sign in to comment.