Commit 0104236
[JniValueManager] Make TryConstructPeer virtual (#1456)
Follow-up to #1441
We need this method virtual so that `JavaMarshalValueManager` can override it and try to invoke the `XAConstructorSignature`. The method was previously virtual but as an oversight I removed it in #1441:
- https://github.com/dotnet/java-interop/pull/1441/changes#diff-8ead12d157bc7712affd3d920bb93cddbff3885147fe6297957a44cc522d5430R7
- https://github.com/dotnet/java-interop/pull/1441/changes#diff-b92884de5db7f82df63b483b8319360cd9bfdac3cd97222eb9aff7292a01a07bL449-L467
I noticed we're not disposing the `reference` correctly which might cause a ref leak. In the Mono `AndroidValueManager` we never called into the base method so this would not be observed on mono previously (https://github.com/dotnet/android/blob/main/src/Mono.Android/Java.Interop/TypeManager.cs#L416-L423).
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>1 parent d7dbad5 commit 0104236
2 files changed
Lines changed: 4 additions & 2 deletions
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
233 | 233 | | |
234 | 234 | | |
235 | 235 | | |
236 | | - | |
| 236 | + | |
237 | 237 | | |
238 | 238 | | |
239 | 239 | | |
| |||
247 | 247 | | |
248 | 248 | | |
249 | 249 | | |
250 | | - | |
| 250 | + | |
| 251 | + | |
251 | 252 | | |
252 | 253 | | |
253 | 254 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
| 88 | + | |
0 commit comments