Object Oriented Programming in C++: Part 5 - Destructors
Part 5 in a series about object oriented programming (OOP) in C++. A class’ destructor is a special method that is called automatically whenever an object is destroyed. They’re extremely important and are necessary to prevent memory leaks (newly allocated memory that is never deleted).