Skip to content

Conversation

jonpryor
Copy link
Contributor

Context: 972c5bc
Context: dotnet/android#9146

As our minimum Android API level is now API-21 (Android 5.0), and .NET for Android only sets
Java.Interop.JniRuntime.CreationOptions.NewObjectRequired=true on API-10 and lower, we can remove the support for this option. This has the added benefit of removing the TLS lookup that JniEnvironment.Runtime requires, and thus should improve perf.

Add [Obsolete] to JniRuntime.CreationOptions.NewObjectRequired.

Context: 972c5bc
Context: dotnet/android#9146

As our minimum Android API level is now API-21 (Android 5.0), and
.NET for Android only sets
`Java.Interop.JniRuntime.CreationOptions.NewObjectRequired`=true
on API-10 and lower, we can remove the support for this option.
This has the added benefit of removing the TLS lookup that
`JniEnvironment.Runtime` requires, and thus *should* improve perf.

Add `[Obsolete]` to `JniRuntime.CreationOptions.NewObjectRequired`.
@jonpryor jonpryor force-pushed the dev/jonp/jonp-remove-NewObjectRequired branch from c0a4085 to f3acbe7 Compare August 21, 2024 19:16
@jonpryor jonpryor merged commit dec35f5 into main Aug 21, 2024
@jonpryor jonpryor deleted the dev/jonp/jonp-remove-NewObjectRequired branch August 21, 2024 21:09
@github-actions github-actions bot locked and limited conversation to collaborators Sep 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants