- destroy the jit runtime when all script functions are destroyed

This commit is contained in:
Magnus Norddahl 2018-08-18 17:50:47 +02:00
commit e557e8fac0
3 changed files with 32 additions and 3 deletions

View file

@ -40,6 +40,7 @@
#include "templates.h"
#include "vmintern.h"
#include "types.h"
#include "jit.h"
cycle_t VMCycles[10];
int VMCalls[10];
@ -77,6 +78,12 @@ VMScriptFunction::VMScriptFunction(FName name)
VMScriptFunction::~VMScriptFunction()
{
if (JitFunc)
{
JitCleanUp(this);
JitFunc = nullptr;
}
if (Code != NULL)
{
if (KonstS != NULL)