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
[generator] Bind List<ValueClass> as IList<ValueClass> #13668
Callers must convert each item with Meters.FromJniHandle (item.Handle, JniHandleOwnership.DoNotTransfer). Each item that C# reads also creates a managed peer (a GC handle plus an object) before it is unboxed.
Expected: bind List<Meters> as IList<Meters> (and similar for Set, Map, Collection), using a typed adapter that calls unbox-impl/box-impl for each item and creates no peer.
Steps to Reproduce
Bind a Kotlin library with fun lengths(count: Int): List<Meters>, where Meters is a @JvmInline value class.
The generated method returns IList<Java.Lang.Object>.
Did you find any workaround?
Meters.FromJniHandle (item.Handle, JniHandleOwnership.DoNotTransfer) for each item.
Activity
[generator] Marshal Kotlin value classes across JNI (#13581)