[release/10.0.1xx] [tests] Add regression test for global ref leak in LayoutInflater.Inflate#11134
Merged
jonathanpeppers merged 1 commit intorelease/10.0.1xxfrom Apr 16, 2026
Conversation
…late (#11112) Fixes: #11101 Fixes: #10989 The fix is in Java.Interop (ConstructPeer + Dispose for Invalid refs), included via the submodule bump. This adds an on-device regression test that inflates 100 custom views and asserts the JNI global reference count does not grow significantly. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds an on-device regression test in the Mono.Android test suite to detect JNI global reference growth when repeatedly inflating an AXML layout containing a custom managed view (intended to guard against the global-ref leak described in dotnet/android #11101 / #10989, with the underlying fix coming from the Java.Interop submodule bump).
Changes:
- Add a new device test that inflates a custom-view layout many times and asserts
Java.Interop.Runtime.GlobalReferenceCountdoesn’t grow beyond a threshold. - Add GC “warm-up” and collection steps around the measurement to reduce noise.
Member
Author
|
Only failure is |
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.
Fixes: #11101
Fixes: #10989
The fix is in Java.Interop (ConstructPeer + Dispose for Invalid refs), included via the submodule bump. This adds an on-device regression test that inflates 100 custom views and asserts the JNI global reference count does not grow significantly.