I noticed that Kotlin Native workers are not wrapping the lambda execution with
autoreleasepool
on Darwin platforms. So any ObjC/Swift code that intentionally/unintentionally runs on Kotlin Native workers are going to leak autorelease references, especially when using with Kotlin Coroutines native-mt.
edit: This also seemingly impacts K/N garbage collection, because the wrapper around K/N object reference could be made autorelease references.
Should this be filed as a kotlinx-coroutine issue, or a Kotlin YouTrack one?