Skip to content

Cleanups inside sample are not called, leaking #196

@fabiospampinato

Description

@fabiospampinato

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions