Cleanups inside sample are not called, leaking
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1.1k
- Forks
- 34
- PR merge metrics
- No merged PRs in 30d
Description
In the following Solid code you can see in the console a message gets printed about once every second: https://playground.solidjs.com/?hash=-357212261&version=1.3.7
I don't have the equivalent code for Sinuous, but I'm pretty sure that it won't work right in Sinuous, because by calling `sample` the tracking object is removed, so cleanups are not registered with anything, so they never get called, so you'll see in Sinuous that there will be 4 intervals running at the same time, because they won't be stopped, while there should be just one, like in Solid.
The solution seems to be that in Solid the tracking object and the tracking object for cleanups aren't necessarily the same object, so while there isn't a regular tracking object inside `sample` cleanups kind of bubble up until they can find a parent computation that they can attach themselves to.
Contributor guide
No contributing guide indexed for this repository
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
Reproduce the cleanup leak using the linked Solid playground example, then inspect Sinuous's sample implementation and cleanup registration behavior. Confirm that repeated execution leaves multiple intervals active; done means cleanup callbacks are attached to an enclosing computation and only one interval remains active.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 40/100