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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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