Hey - I'm working on https://bulletz.io which uses miniplex to do all of it's ECS style logic. First of all, great job! Thanks for all of the work on this - I really enjoy using it.
Secondly, I'm struggling a lot with memory leaks. Unfortunately, I think that a ton of values are being captured inside of closures that are then not cleaned up. In particular, I think the queries are what is causing these things to be captured.
I suspect that this is storing a reference to game, which is a temporal object (as well as world), and that these subscriptions are therefore not cleaned up.
Do I need to manually clean up all subscriptions to a world when I want to destroy it? Or is there something else I can do? This feels pretty cumbersome! Do I call disconnect() to destroy a query? I can't tell if this is mean't to be a user facing method or not based on some other implementation details.
Hey - I'm working on https://bulletz.io which uses miniplex to do all of it's ECS style logic. First of all, great job! Thanks for all of the work on this - I really enjoy using it.
Secondly, I'm struggling a lot with memory leaks. Unfortunately, I think that a ton of values are being captured inside of closures that are then not cleaned up. In particular, I think the queries are what is causing these things to be captured.
When I create a query, I do something like:
I suspect that this is storing a reference to game, which is a temporal object (as well as world), and that these subscriptions are therefore not cleaned up.
Do I need to manually clean up all subscriptions to a world when I want to destroy it? Or is there something else I can do? This feels pretty cumbersome! Do I call
disconnect()
to destroy a query? I can't tell if this is mean't to be a user facing method or not based on some other implementation details.Thanks for all the hard work and any guidance!