You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Opt-in resource leak detector (log-only, no auto-close) #45
A caller who forgets to close a response/stream gets no signal until something breaks.
Proposed change
Add an opt-in leak detector that logs a WARN when a closeable becomes phantom-reachable without having been closed. Obtain java.lang.ref.Cleaner reflectively (cached by lazy) so the same Java-8 bytecode uses it on JDK 9+ and no-ops on 8. Reuse the existing closed flag as the "was it closed?" signal. Gate behind a system property; default off. Do not auto-close — detection only (auto-closing a caller-owned resource is the hazard we deliberately avoid).
Prior art: openai-java's PhantomReachable uses the reflective-Cleaner technique (Apache-2.0 — attribute the lifted util).
Activity