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

Avoid using a nested WeakMap for manager instances for a given owner. #1347

Merged
merged 1 commit into from
Oct 18, 2021

Conversation

rwjblue
Copy link
Member

@rwjblue rwjblue commented Oct 12, 2021

The first level WeakMap is sufficient to prevent memory leaks. The only potential value that the second level WeakMap provides is to allow us to unload code during the lifetime of a single owner instance, which is really not something that we support.

Having nested WeakMap's breaks some tooling around memory leak investigation that we commonly use.

The first level WeakMap is sufficient to prevent memory leaks. The only
potential value that the second level WeakMap provides is to allow us to
_unload_ code during the lifetime of a single owner instance, which is
really not something that we support.

Having nested WeakMap's breaks some tooling around memory leak
investigation that we commonly use.
@rwjblue rwjblue added the bug label Oct 18, 2021
@rwjblue rwjblue merged commit 8d3bb5c into release-0-65 Oct 18, 2021
@rwjblue rwjblue deleted the avoid-nested-weakmap branch October 18, 2021 21:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants