~SimulatorController: do not free ConcreteCPU object ptr in the base class
In fact, delete should be called in the destructor of each derived class (BochsController and Gem5Controller at the moment). Additionally, this is the reason why ~SimulatorController is declared as virtual. git-svn-id: https://www4.informatik.uni-erlangen.de/i4svn/danceos/trunk/devel/fail@2064 8c4709b5-6ec9-48aa-a5cd-a96041d1645a
This commit is contained in:
@ -22,6 +22,15 @@ void Gem5Controller::startup()
|
||||
SimulatorController::startup();
|
||||
}
|
||||
|
||||
Gem5Controller::~Gem5Controller()
|
||||
{
|
||||
std::vector<ConcreteCPU*>::iterator it = m_CPUs.begin();
|
||||
while (it != m_CPUs.end()) {
|
||||
delete *it;
|
||||
it = m_CPUs.erase(it);
|
||||
}
|
||||
}
|
||||
|
||||
bool Gem5Controller::save(const std::string &path)
|
||||
{
|
||||
connector.save(path); // FIXME: not working?!
|
||||
|
||||
Reference in New Issue
Block a user