Fundamentals of C++ Game Development: Dynamic Memory Allocation with new and delete
Before discussing dynamic memory allocation, let’s first look at the two basic types of memory allocation in C++: Static memory allocation is used for static and global variables. The memory for these variables is allocated all at once when the program runs and lasts for the entire lifecycle of the program. Automatic memory allocation is … Read more