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

When constructing cyclic proxies share an invocation handler across all allocated proxies. #1855

Closed
wants to merge 0 commits into from

Conversation

copybara-service[bot]
Copy link

When constructing cyclic proxies share an invocation handler across all allocated proxies.

Additionally optimize the implementation of DelegatingInvocationHandler to eliminate an unnecessary field

With these two optimizations in place, the maximum size of a leak from resolving multithreaded lock cycles in SingletonScope is now a single tiny object, so instead of eagerly clearing out proxies to avoid a leak we can just wait to satisfy them if someone attempts to construct the singleton a second time, and if we don't we just won't sweat these 16 bytes.

@copybara-service copybara-service bot closed this Jan 10, 2025
@copybara-service copybara-service bot deleted the test_713820950 branch January 10, 2025 17:46
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.

0 participants