Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: ensure child effects are removed from parent branches #10985

Merged
merged 4 commits into from
Mar 29, 2024

Conversation

trueadm
Copy link
Contributor

@trueadm trueadm commented Mar 29, 2024

This should prevent the effects array of a branch effect from growing indefinitely – causing memory leaks.

Copy link

changeset-bot bot commented Mar 29, 2024

🦋 Changeset detected

Latest commit: 5cfe19e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
svelte Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@Rich-Harris
Copy link
Member

This is presumably quite costly if you're removing large numbers of items from an each block (for each of . Do we definitely want to do this, or should we go straight to a linked list implementation?

At the very least we should probably update pause_effects so that it works backwards, since splicing from the end is much cheaper than splicing from the beginning

@trueadm
Copy link
Contributor Author

trueadm commented Mar 29, 2024

@Rich-Harris I looked at this is a temp fix until I've implanted linked lists. Ideally we'd use the controlled input to just wipe all children in one go.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants