You’re ready now to apply what you’ve learned about class definitions, pointers, and constructors and destructors to be able to create new instances in the main computer memory. There are some fundamental differences between C++ and C# that we’re going to again focus on just C++ first and then explore C# in tomorrow’s episode.

You learn what an instance of your class is, where it lives in memory, how small can it actually be, and how to dynamically allocate the memory to create instances and then delete them when you’re done.

Along the way, we’ll explore the stack again. You’ll learn a bit more about global variables and something new called static variables. And you’ll learn when and how to use the heap to store your variables.

I also explain how the C++ runtime interacts with your operating system to manage memory.