regression fix delete [] #46
This commit is contained in:
parent
cf80c63c22
commit
1fbb81a4d9
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue