I forgot what I was doing because it's 4:30am

This commit is contained in:
2022-11-03 18:20:16 +01:00
parent 0775e56c1b
commit c32fca6a23
8 changed files with 158 additions and 41 deletions

View File

@@ -98,7 +98,7 @@ static int nativeLoadRootNode(Interpreter* interpreter, LiteralArray* arguments)
//clear existing root node
if (engine.rootNode != NULL) {
callEngineNode(engine.rootNode, &engine.interpreter, "onFree");
callRecursiveEngineNode(engine.rootNode, &engine.interpreter, "onFree");
freeEngineNode(engine.rootNode);
FREE(EngineNode, engine.rootNode);
@@ -136,7 +136,7 @@ static int nativeLoadRootNode(Interpreter* interpreter, LiteralArray* arguments)
initEngineNode(engine.rootNode, &inner, tb, size);
//init the new node
//init the new node (and ONLY this node)
callEngineNode(engine.rootNode, &engine.interpreter, "onInit");
//cleanup