[Note: Automatic lifetime is indeed the right default -- correct and efficient. When you need to use the heap, however, note that you should now use unique_ptr
(or if necessary shared_ptr
via make_shared
) instead of explicit new
and delete
. -- Ed.]
Hello again, I’m Vittorio Romeo, a computer science student, hobbyist game developer and C++ enthusiast.
I’ve uploaded the third episode of “Dive into C++11” on my YouTube channel.
In this episode we'll take a break from game development to delve into C and C++'s memory and lifetime management.
We'll talk about automatic variable lifetime, pointers in general and dynamic memory allocation.
The intended audience for this tutorial/screencast are people who have some experience with C++ in general, and who watched the previous episodes. This episode may be very interesting for those with experience with C++ who want to learn more about variable lifetime and memory management.
I greatly appreciate comments and criticism, and ideas for future videos/tutorials.
Feel free to fork/analyze the source code at: https://github.com/SuperV1234/Tutorials
You can find the previous episodes here:
Add a Comment
Comments are closed.