From 1fbb81a4d91739f585e16b294ae4c888abf229d9 Mon Sep 17 00:00:00 2001 From: Dolu1990 Date: Sun, 9 Dec 2018 15:40:02 +0100 Subject: [PATCH] regression fix delete [] #46 --- src/test/cpp/regression/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/test/cpp/regression/main.cpp b/src/test/cpp/regression/main.cpp index 2d5bd2a..92a0a0c 100644 --- a/src/test/cpp/regression/main.cpp +++ b/src/test/cpp/regression/main.cpp @@ -35,7 +35,7 @@ public: for(uint32_t i = 0;i < (1 << 12);i++) mem[i] = NULL; } ~Memory(){ - for(uint32_t i = 0;i < (1 << 12);i++) if(mem[i]) delete mem[i]; + for(uint32_t i = 0;i < (1 << 12);i++) if(mem[i]) delete [] mem[i]; } uint8_t* get(uint32_t address){ @@ -147,7 +147,7 @@ void loadHexImpl(string path,Memory* mem) { size--; } - delete content; + delete [] content; }