cleanly destroy MyProcessor to allow for creating/destroying VMs in the same process multiple times

This commit is contained in:
Joshua Warner 2014-05-20 16:11:28 -06:00 committed by Joshua Warner
parent 1396551433
commit e2f613e063
2 changed files with 4 additions and 1 deletions

View File

@ -8935,6 +8935,8 @@ class MyProcessor: public Processor {
signals.unregisterHandler(SignalRegistrar::DivideByZero);
signals.setCrashDumpDirectory(0);
this->~MyProcessor();
allocator->free(this, sizeof(*this));
}

View File

@ -3263,8 +3263,9 @@ class MyProcessor: public Processor {
}
virtual void dispose() {
allocator->free(this, sizeof(*this));
signals.setCrashDumpDirectory(0);
this->~MyProcessor();
allocator->free(this, sizeof(*this));
}
System* s;