I have a problem when I use worker mode for an object. I can get around 200 of the same models on screen at once without lag but the game crashes after running it for around 5 minutes or so. Seems to be a memory leak? I get this error on the games window.
SBOX_FATAL_MEMORY_EXCEEDED
Here is a test demo, I only have 16gb ram might take a bit longer for other to get the error.
https://www.mediafire.com/file/ec10qwvs5djld87/crash.c3p/file
EDIT: Lowering animation rate or having the objects offscreen does NOT help at all, still crashes. It only prolongs the amount of time that goes by before it crashes. Also exporting with nwjs, the game window simply closes after a while.
My game has 1 enemy monster so far thats 256 tris and a texture of 128x128. The crash happens with 300 of them even when my fps was at max 144 still with no drops.
EDIT: Reuploaded a better test that's 250 models and 144 fps with worker crash.