From f6f31dd14382d207be8e08229ec783033e28bc0d Mon Sep 17 00:00:00 2001 From: Tshepang Lekhonkhobe Date: Thu, 3 Sep 2015 21:10:48 +0200 Subject: [PATCH] book: improve paragraph on stack de-allocation --- src/doc/trpl/the-stack-and-the-heap.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/doc/trpl/the-stack-and-the-heap.md b/src/doc/trpl/the-stack-and-the-heap.md index e7e98c5828c..91b892fccaa 100644 --- a/src/doc/trpl/the-stack-and-the-heap.md +++ b/src/doc/trpl/the-stack-and-the-heap.md @@ -41,8 +41,8 @@ and just consider the local variables we’re allocating. So in this case, when This is automatically handled for you, as you can see, we didn’t have to write any special Rust code or anything. -When the function is over, its stack frame gets deallocated. This happens -automatically, we didn’t have to do anything special here. +When the function exits, its stack frame gets deallocated. This happens +automatically as well. That’s all there is for this simple program. The key thing to understand here is that stack allocation is very, very fast. Since we know all the local