Skip to content

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

Closed
copybara-service[bot] wants to merge 0 commit intomasterfrom
test_713820950
Closed

When constructing cyclic proxies share an invocation handler across all allocated proxies.#1855
copybara-service[bot] wants to merge 0 commit intomasterfrom
test_713820950

Conversation

@copybara-service
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