Summary
Full Transcript
►Full C++ Series Playlist: https://www.youtube.com/playlist?list=PLvv0ScY6vfd8j-tlhYVPYgiIyXduu6m-L ►Find full courses on: https://courses.mshah.io/ ►Join as Member to Support the channel: https://www.youtube.com/channel/UCA64pZbN5Mz5NxC3SO4qpDg/join ►Lesson Description: In this lesson we learn about heap memory, and how to allocate memory on the heap with 'new' and 'delete' operators. We need heap memory so that we can acquire resources at run-time, especially if we do not know how much of a resource (i.e. how big of an array to allocate) we need. Additionally, memory that we allocate on the heap is 'long-lived' and lives longer than the block-scope of stack memory. Keep in mind, this is one of the powers of C++, the ability to manage our memory. That said, we also need to responsibly delete our memory in C++ when we are done with the resource. Link to a full video on pointers from start to finish: https://www.youtube.com/watch?v=2R5cjpi9Fzw&list=PLvv0ScY6vfd8YRjgGvXKJRAMZQAxNypcH&index=7& ►YouTube Channel: https://www.youtube.com/c/MikeShah ►Please like and subscribe to help the channel!
