Automatic detection for missing scene destroy in specs
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 15.8k
- Forks
- 3.9k
- Avg merge
- 4d 6h
- Merged PRs (30d)
- 34
Description
It should be straightforward to add the ability for the tests to dump out a message or produce an error if someone creates a scene instance but does not remember to destroy it. Basically, whenever anyone calls createScene in the specs, we would store it in a global list (and it gets removed when the scene is destroyed). At the end of the tests, any scenes that still exist would get dumped out with the location where it was created (using a callstack retrieved during the creation process).
This should help us keep a handle on scenes (and possible other resources) that need to be cleaned up as part of tests rather than relying on GC.
Contributor 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.
Research direction
Start by locating createScene in the specs and the existing scene-destruction and test-teardown paths. Trace how scenes are created and destroyed, then define a cleanup check that records creation locations and reports any scenes still alive at the end of tests. Done means leaked scenes are identified without relying on garbage collection.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- testing
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100