Merge pull request #94 from jullej/master

Fixed typos in chapter C.127
This commit is contained in:
Gabriel Dos Reis
2015-09-23 06:31:41 -07:00

View File

@@ -4781,13 +4781,13 @@ not using this (over)general interface in favor of a particular interface found
// ... no destructor ... // ... no destructor ...
}; };
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
string s {"default"}; string s {"default"};
}; };
void use() void use()
{ {
B* p = new B; B* p = new D;
delete p; // leak the string delete p; // leak the string
} }