Skip to content

Commit 6ea1422

Browse files
committed
Update CppCoreGuidelines.md
Must be `int* p = new int[12]; delete[] p;`
1 parent 7255e7d commit 6ea1422

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
@@ -10510,7 +10510,7 @@ We could carefully release the resource before the throw:
1051010510
int* p = new int[12];
1051110511
// ...
1051210512
if (i < 17) {
10513-
delete p;
10513+
delete[] p;
1051410514
throw Bad {"in f()", i};
1051510515
}
1051610516
// ...

0 commit comments

Comments
 (0)