Skip to content
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

Entity manager memory leak #2726

Closed
eonarheim opened this issue Aug 2, 2023 Discussed in #2715 · 0 comments · Fixed by #2727
Closed

Entity manager memory leak #2726

eonarheim opened this issue Aug 2, 2023 Discussed in #2715 · 0 comments · Fixed by #2727

Comments

@eonarheim
Copy link
Member

Discussed in #2715

Originally posted by Lzrs111 August 1, 2023
Hi,

I'm making a game which is basically a Vampire Survivors clone - so lots of enemies, projectiles and Actors in general. I've noticed that after a while on mobile especially the game just kinda slows down and crashes. My guess is there's a memory leak somewhere. After checking the code on my side, I can't find any problems, so I decided to take heap snapshots and it seems the Entity Manager _entititiesToRemove array does not get cleared, just gets filled with more entities:

Snapshot 1:
image

Snapshot2 :
image

I think this might be the source of the problem. Can you please check and confirm? Thanks

eonarheim added a commit that referenced this issue Aug 2, 2023
Closes #2726

Properly clears internal state after entities have removed from the world
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant