diff --git a/src/compile.cpp b/src/compile.cpp index 3e853d1b39..cd13d8f59a 100644 --- a/src/compile.cpp +++ b/src/compile.cpp @@ -8935,6 +8935,8 @@ class MyProcessor: public Processor { signals.unregisterHandler(SignalRegistrar::DivideByZero); signals.setCrashDumpDirectory(0); + this->~MyProcessor(); + allocator->free(this, sizeof(*this)); } diff --git a/src/interpret.cpp b/src/interpret.cpp index b429aaaf93..cf8e296e49 100644 --- a/src/interpret.cpp +++ b/src/interpret.cpp @@ -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;