We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents f1981f9 + 5a4e719 commit 029016fCopy full SHA for 029016f
CppCoreGuidelines.md
@@ -4781,13 +4781,13 @@ not using this (over)general interface in favor of a particular interface found
4781
// ... no destructor ...
4782
};
4783
4784
- stuct D : B { // bad: class with a resource derived from a class without a virtual destructor
+ struct D : B { // bad: class with a resource derived from a class without a virtual destructor
4785
string s {"default"};
4786
4787
4788
void use()
4789
{
4790
- B* p = new B;
+ B* p = new D;
4791
delete p; // leak the string
4792
}
4793
0 commit comments