C.180 example bugfix (#1587)

new[] needs delete[]
This commit is contained in:
Akash Mozumdar
2020-03-16 06:27:00 -06:00
committed by GitHub
parent 2f0c2e5874
commit aea393c85c

View File

@@ -8502,7 +8502,7 @@ But heed the warning: [Avoid "naked" `union`s](#Ru-naked)
~Immutable_string() ~Immutable_string()
{ {
if (size >= buffer_size) if (size >= buffer_size)
delete string_ptr; delete[] string_ptr;
} }
const char* get_str() const const char* get_str() const