Skip to content

Glossary: Software Design Patterns in C++

Virtual destructor

Also written: virtual ~

A destructor marked `virtual` so that deleting a child through a base pointer runs the child's destructor. Every base class used through pointers needs one.

Where the book teaches it

Related terms

Abstract class= default