C.180 example bugfix (#1587)

new[] needs delete[]
pull/1592/head
Akash Mozumdar 6 years ago committed by GitHub
parent 2f0c2e5874
commit aea393c85c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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

Loading…
Cancel
Save