C++.Coding.Standards.1918.Rules.Guidelines [Electronic resources]

Herb Sutter, Andrei Alexandrescu

نسخه متنی -صفحه : 521/ 266
نمايش فراداده

Summary

To delete, or not to delete; that is the question: If deletion through a pointer to a base

Base should be allowed, then

Base 's destructor must be public and virtual. Otherwise, it should be protected and nonvirtual.