matter-js icon indicating copy to clipboard operation
matter-js copied to clipboard

Memory Leak when Engine.enableSleeping == true

Open 411411qq opened this issue 2 years ago • 2 comments

I set Engine.enableSleeping == true, there is some staic objects in the stage. The staic objects will be sleeping in a while. When a dynamic object collide with a staic object, a new Pair will be added to Engine.pairs.list. This new Pair will never be removed, because one object in this pair is sleeping, even one object is removed. May I do something wrong? And now I know my English is terrible!

411411qq avatar Feb 04 '23 06:02 411411qq

Could you try this alpha build from PR #1079 and let me know if that solves the issue? Otherwise if you're able to share a minimal example that would help!

liabru avatar Feb 28 '23 15:02 liabru

hi,here is the example. sleepingTest.zip

411411qq avatar Mar 02 '23 10:03 411411qq