0

I have a problem with v8. I am creating object with NewInstance from Object Template. This function is being called every frame, and I have such code (see below), where GC does not collect objects from returned array and therefore I have memory leak

Events.on("frame", () => { let objs = Test.getAllObjects(); });

Test.getAllObjects returns array of objects created with NewInstance I can't figure out why objects returned by this function are still alive

1 Answers1

0

I've solved it. If you have such problem - remember to firstly save your object template to Persistent and then get it from it