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

Investigate and fix possible memory leaks in store2 #2477

Closed
dai-shi opened this issue Apr 4, 2024 · 6 comments · Fixed by #2533
Closed

Investigate and fix possible memory leaks in store2 #2477

dai-shi opened this issue Apr 4, 2024 · 6 comments · Fixed by #2533
Assignees

Comments

@dai-shi
Copy link
Member

dai-shi commented Apr 4, 2024

#2463 (comment)

@dai-shi
Copy link
Member Author

dai-shi commented Apr 10, 2024

@backbone87 Do you have any idea for the scenario where only store2 fails with #2463 (comment) ?

@backbone87
Copy link
Contributor

the downstream deps (t) must only be tracked for mounted downstream deps

@dai-shi
Copy link
Member Author

dai-shi commented Apr 10, 2024

because it leaks memory, or any other reason?

@backbone87
Copy link
Contributor

yes because it leaks memory. you could keep the non-mounted downstream in weakrefs but I think that is more expensive than just always "pulling" unmounted atoms on read

@dai-shi
Copy link
Member Author

dai-shi commented Apr 10, 2024

Do you think you can write a test that passes with store.ts and fails with store2.ts?

@dai-shi
Copy link
Member Author

dai-shi commented May 5, 2024

Do you think you can write a test that passes with store.ts and fails with store2.ts?

I was able to do it and am working on it: #2533

@dai-shi dai-shi self-assigned this May 5, 2024
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 a pull request may close this issue.

2 participants