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

change: add Scope to view function in <For/> to avoid memory "leak" #492

Merged
merged 4 commits into from
Feb 9, 2023

Conversation

gbj
Copy link
Collaborator

@gbj gbj commented Feb 8, 2023

At present, because the each_fn doesn’t take a Scope as one of its arguments, each EachItem is rendered with the scope of the Each itself. This means that if there are dynamic children for example the create_effect will be created on the scope of the Each, not the EachItem, so it will be disposed eventually but not when the row is destroyed. This means as you create and destroy rows you keep allocating more and more signals.

@gbj gbj changed the title change: add Scope to view function in <For/> to avoid memory leak change: add Scope to view function in <For/> to avoid memory "leak" Feb 8, 2023
@gbj gbj marked this pull request as draft February 9, 2023 00:41
@gbj gbj marked this pull request as ready for review February 9, 2023 00:41
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

1 participant