add destructor for clean exit

This commit is contained in:
Màrius Montón 2019-09-08 11:42:05 +02:00
parent 1babf6cb88
commit 1bb3200eb6
2 changed files with 7 additions and 0 deletions

View File

@ -39,6 +39,8 @@ public:
Memory(sc_module_name name, string filename);
Memory(sc_module_name name, bool use_file);
~Memory(void);
/**
* @brief Returns Program Counter read from hexfile
* @return Initial PC

View File

@ -31,6 +31,11 @@ Memory::Memory(sc_module_name name, bool use_file): sc_module(name)
//memset(mem, 0, SIZE*sizeof(uint8_t));
}
Memory::~Memory() {
delete mem;
}
uint32_t Memory::getPCfromHEX() {
return program_counter;