regression fix delete [] #46

This commit is contained in:
Dolu1990 2018-12-09 15:40:02 +01:00
parent cf80c63c22
commit 1fbb81a4d9
1 changed files with 2 additions and 2 deletions

View File

@ -35,7 +35,7 @@ public:
for(uint32_t i = 0;i < (1 << 12);i++) mem[i] = NULL; for(uint32_t i = 0;i < (1 << 12);i++) mem[i] = NULL;
} }
~Memory(){ ~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){ uint8_t* get(uint32_t address){
@ -147,7 +147,7 @@ void loadHexImpl(string path,Memory* mem) {
size--; size--;
} }
delete content; delete [] content;
} }