Skip to content

chore: use update_version instead of WeakRef in SvelteSet/SvelteMap #16324

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

Conversation

Rich-Harris
Copy link
Member

Simpler way to avoid memory leaks in #16239

Copy link

changeset-bot bot commented Jul 9, 2025

⚠️ No Changeset found

Latest commit: 743b2a9

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@Rich-Harris Rich-Harris changed the title use update_version instead of WeakRef in SvelteSet/SvelteMap chore: use update_version instead of WeakRef in SvelteSet/SvelteMap Jul 9, 2025
Copy link
Contributor

github-actions bot commented Jul 9, 2025

Playground

pnpm add https://pkg.pr.new/svelte@16324

@paoloricciuti paoloricciuti merged commit 3ab41d6 into source-to-state-in-classes Jul 9, 2025
11 checks passed
@paoloricciuti paoloricciuti deleted the source-to-state-in-classes-update-version branch July 9, 2025 13:09
Rich-Harris added a commit that referenced this pull request Jul 9, 2025
* fix: use `state` instead of `source` in reactive classes

* fix: use `active_reaction` as indication to use `source` or `state`

* fix: cleanup `#initial_reaction` on `teardown` to free memory

* fix: use `#source` in `set` too

* unused

* chore: use WeakRef

* use update_version instead of WeakRef in SvelteSet/SvelteMap (#16324)

* tidy up

* tweak comment to remove active_reaction reference

---------

Co-authored-by: Rich Harris <rich.harris@vercel.com>
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.

2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy