-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Possible memory leak in physics collisions? #15
Comments
Also to clarify, this leak happens regardless if the callback with |
Thanks for the in-depth report. I’ll see if I manage to reproduce, and let you know what I find out. |
Although it's been a while I though I should let you know that I haven't been able to reproduce the issue. If you still experience it yourself I created an example in |
@16patsle Fair enough; it has been a while lol but I might take another shot at this and see what might have been happening 👍 If you want to close the issue that's fine - thanks for getting back on this though! |
Hey, using your plugin and wired together the basic 'on mouse pressed' example that fires some random bullets. IE:
so that works fine. However, if I include the
overlap()
Arcade Physics logic to track collisions between my other scene sprites & weapon bullets, I notice that the FPS collapses after a while. It goes from a smooth 60fps, to < 10fps. I keep the mouse button down and after about 10 seconds, the FPS starts dropping. Letting go of the mouse, but the FPS continues to drop.So I don't have any particular debug info: the FPS drop for sure happens if the
overlap()
logic is included (this.allSprites
contains a bunch of normalArcadeSprite
sprites).Without that
overlap
logic, holding the mouse button down doesn't cause the FPS drop at all. I wonder is there something going on with the Bullets when they 'die' yet they're still being cached by theArcadePhysics
overlap()
function?The plugin is great and just what I need, but this FPS lag means I can't use it ATM. I probably could hot-patch some 'fake' physics overlap logic, but would be a shame not to use the code provided out-of-box.
The text was updated successfully, but these errors were encountered: