removed ffi stop [memleak]

This commit is contained in:
John Alanbrook 2024-03-20 17:12:36 -05:00
parent 5a52afc2fd
commit 51f3b5abeb
4 changed files with 0 additions and 12 deletions

View file

@ -274,7 +274,6 @@ var gameobject = {
console.info(`Creating entity of type ${ent.ur}`); console.info(`Creating entity of type ${ent.ur}`);
ent.warp_layer = [true]; ent.warp_layer = [true];
ent.phys = 2;
ent.components = {}; ent.components = {};
ent.objects = {}; ent.objects = {};
ent.timers = []; ent.timers = [];
@ -326,7 +325,6 @@ var gameobject = {
mur.proto = json.decode(json.encode(ent)); mur.proto = json.decode(json.encode(ent));
ent.sync(); ent.sync();
console.info(`entity is type ${ent.phys}`);
if (!Object.empty(ent.objects)) { if (!Object.empty(ent.objects)) {
var o = ent.objects; var o = ent.objects;
@ -340,8 +338,6 @@ var gameobject = {
} }
} }
console.info(`Made object with mass ${ent.mass} and moi ${ent.moi}`);
return ent; return ent;
}, },

View file

@ -1626,8 +1626,3 @@ void ffi_load() {
JS_FreeValue(js,globalThis); JS_FreeValue(js,globalThis);
} }
void ffi_stop()
{
JS_FreeValue(js, sound_proto);
}

View file

@ -6,7 +6,6 @@
#include "dsp.h" #include "dsp.h"
void ffi_load(); void ffi_load();
void ffi_stop();
JSValue vec22js(HMM_Vec2 v); JSValue vec22js(HMM_Vec2 v);
HMM_Vec2 js2vec2(JSValue v); HMM_Vec2 js2vec2(JSValue v);

View file

@ -29,9 +29,7 @@ void script_startup() {
void script_stop() void script_stop()
{ {
script_evalf("Event.notify('quit');");
script_evalf("prosperon.quit();"); script_evalf("prosperon.quit();");
ffi_stop();
#if LEAK #if LEAK
JS_FreeContext(js); JS_FreeContext(js);