Repository navigation
Conversation
This was referenced Oct 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
After a hot reload, an idle executor thread and retained inactive hook handles/callback parameters can outlive their useful work. Refused or failed requests can also leave received DEX resources unconsumed. This change releases those framework-owned resources while allowing in-flight callbacks to finish on the generation they entered.
Applies directly to master. This is resource-lifetime cleanup; it does not change the reload negotiation policy or replace #992. It is independent of daemon reconnection #1017 and #1012; the three changes were also built/tested together.
Validation and limits
Validation: clean-source Kotlin and four-ABI native builds; host tests exercise production classes and native callback operations, including 3,000 replacements, 8,000 concurrent queue submissions, 100 drained batches, and DEX failure cleanup. On Android 12 with NeoZygisk, a local validation build completed two consecutive reloads in one application process, then two more after a KernelSU emulated soft reboot. Retained old callback parameters did not prevent retired module/loader weak references from clearing; in-flight callbacks completed, the idle reload worker exited, and the process FD count stayed flat. The clean PR sources were built separately from that local validation build.
Limits: host
SharedMemorytests use controlled doubles. The change releases framework-owned references and DEX inputs; ART controls reclamation of its own DEX memory. It does not unload native module libraries or reclaim objects deliberately retained by module/application code.