From 6ea1422dd605b13778423e3b82d4ac933249292e Mon Sep 17 00:00:00 2001 From: Roman Date: Mon, 11 Apr 2016 14:41:58 +0400 Subject: [PATCH] Update CppCoreGuidelines.md Must be `int* p = new int[12]; delete[] p;` --- CppCoreGuidelines.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CppCoreGuidelines.md b/CppCoreGuidelines.md index b835c57..5f41bf5 100644 --- a/CppCoreGuidelines.md +++ b/CppCoreGuidelines.md @@ -10510,7 +10510,7 @@ We could carefully release the resource before the throw: int* p = new int[12]; // ... if (i < 17) { - delete p; + delete[] p; throw Bad {"in f()", i}; } // ...