mirror of
https://github.com/corda/corda.git
synced 2025-06-18 07:08:15 +00:00
cleanly destroy MyProcessor to allow for creating/destroying VMs in the same process multiple times
This commit is contained in:
committed by
Joshua Warner
parent
1396551433
commit
e2f613e063
@ -8935,6 +8935,8 @@ class MyProcessor: public Processor {
|
|||||||
signals.unregisterHandler(SignalRegistrar::DivideByZero);
|
signals.unregisterHandler(SignalRegistrar::DivideByZero);
|
||||||
signals.setCrashDumpDirectory(0);
|
signals.setCrashDumpDirectory(0);
|
||||||
|
|
||||||
|
this->~MyProcessor();
|
||||||
|
|
||||||
allocator->free(this, sizeof(*this));
|
allocator->free(this, sizeof(*this));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3263,8 +3263,9 @@ class MyProcessor: public Processor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
virtual void dispose() {
|
virtual void dispose() {
|
||||||
allocator->free(this, sizeof(*this));
|
|
||||||
signals.setCrashDumpDirectory(0);
|
signals.setCrashDumpDirectory(0);
|
||||||
|
this->~MyProcessor();
|
||||||
|
allocator->free(this, sizeof(*this));
|
||||||
}
|
}
|
||||||
|
|
||||||
System* s;
|
System* s;
|
||||||
|
Reference in New Issue
Block a user