Consider detaching game from DevToolsService when not needed
Maintainers usually reply within 1 day
@filiph is already working on this.
Since Sep 21, 2024.
Assessment
This issue has not been assessed yet.
Description
What could be improved
Not a big deal, but currently, when running a game in debug mode, any FlameGame that is ever started will forever be retained in memory unless replaced with a different FlameGame.
From FlameGame's constructor:
if (kDebugMode) {
DevToolsService.initWithGame(this);
}
There is no DevToolsService.detachGame() or anything similar.
Why should this be improved
This can be confusing when one's looking at memory (albeit I agree that one should be normally doing that in profile mode) and sees a game that's supposed to be gone a long time ago, and won't go away even after manual GC.
This almost sent me on a wild goose chase for a giant game-sized memory leak.
Risks
- Some people might want to inspect their game after it's been disposed?
- Could introduce a DevTools connector bug where game's disposed too soon, for example.
More information
I'm not sure myself if this is something worth addressing. Just putting this here before I forget.
Other
- Are you interested in working on a PR for this?
- Dominant language
- Dart
- Stars
- 10.8k
- Forks
- 1.1k
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 61
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from flame-engine/flame
-
Timer with tickCount stays finished after start() or reset()Possibly taken @matthewalberto claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
flame-engine/flame#4240 · 1 comment ·
Maintainers usually reply within 1 day
-
`CameraComponent.follow` follows the local position of a nested targetPossibly taken @ufrshubham claimed this today. Openbug
flame-engine/flame#4238 · 1 assignee ·
Maintainers usually reply within 1 day
-
`ComponentPool` returns components to the pool while they are still in use, and loses components removed before mountingPossibly taken @ufrshubham claimed this 18 days ago. Openbug
flame-engine/flame#4191 · 1 assignee ·
Maintainers usually reply within 1 day
-
Move the flame_studio debugging features to flame_devtoolsPossibly taken A pull request linked to this issue is open or already merged. Openenhancement
Difficulty 5/5 Over a week Newbie friendliness 35/100
flame-engine/flame#4176 ·
Maintainers usually reply within 1 day
-
discussion enhancement
Difficulty 5/5 Over a week Newbie friendliness 25/100
flame-engine/flame#4175 ·
Maintainers usually reply within 1 day
All issues in flame-engine/flame
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
spotiflacapp/SpotiFLAC-Mobile#935 ·
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
chriskelly/wish-together#193 ·
Maintainers usually reply within 1 day
-
area: player feature request
Difficulty 2/5 1-3 hours Newbie friendliness 65/100