Dynamic allocation of objects on the free store (part 1)

This lesson contains approximately 28 minutes of video content.

Memory allocation review

In my diagram, I write free store (aka heap). Unfortunately, this equivalence isn't entirely correct: there is a logical distinction between the two. The free store is to C++, as the heap is to C. Many C++ programmers consider objects dynamically allocated and released using C (not C++) "conventions" (e.g., malloc) as heap objects, and objects allocated using C++'s new or new[] and released using delete or delete[] as free store objects.

Dynamically allocated objects

What's on the stack? What's in the free store?

The different flavors of the delete operator

Questions