The C++ Programming Language - Classes part 17 - Virtual Destructors (Make base class destructor virtual)| Modern Cpp Series Ep. 53
4.0(5)
38 learners
What you'll learn
This course includes
68.3 hours of video
Certificate of completion
Access on mobile and TV
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 I show you why you have to make your base classes in an inheritance hierarchy virtual. In order for a derived class to call all of the appropriate destructors in the inheritance hierarchy, the base class destructors must be marked as virtual. This ensures that proper RAII practices are being used, and that resources are properly freed in each of the base classes from the derived class.
►YouTube Channel: https://www.youtube.com/c/MikeShah
►Please like and subscribe to help the channel!
Continue this lesson in the app
Install CourseHive on Android or iOS to keep learning while you move.