Skip to content

Commit aea393c

Browse files
authored
C.180 example bugfix (#1587)
new[] needs delete[]
1 parent 2f0c2e5 commit aea393c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

CppCoreGuidelines.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8502,7 +8502,7 @@ But heed the warning: [Avoid "naked" `union`s](#Ru-naked)
85028502
~Immutable_string()
85038503
{
85048504
if (size >= buffer_size)
8505-
delete string_ptr;
8505+
delete[] string_ptr;
85068506
}
85078507

85088508
const char* get_str() const

0 commit comments

Comments
 (0)