5,321
edits
(→Memory) |
|||
Line 132: | Line 132: | ||
====Deallocate==== | ====Deallocate==== | ||
Normally, containers such as <code>std::vector</code> will automatically deallocate memory from the heap when the destructor is called. However, occationally you may want to | Normally, containers such as <code>std::vector</code> will automatically deallocate memory from the heap when the destructor is called. However, occationally you may want to coerse this deallocation yourself.<br> | ||
There are a few ways to do this: | There are a few ways to do this: | ||
* Use smart pointers | * Use smart pointers |