Will the Objective-C reference-counting be integrated with the Kotlin/Native reference-counting somehow? (Perhaps via the recently added finalizer support?)
s
svyatoslav.scherbina
09/01/2017, 9:52 AM
Objective-C reference counting is already integrated. When the Kotlin wrapper is created, the Objective-C object is retained. When wrapper gets deallocated, the Objective-C object is released.
t
tunedal
09/01/2017, 10:30 AM
Ah, neat! Is this feature built-in to the compiler, or could I do the same thing in my Kotlin code (i.e., release native objects when Kotlin wrapper objects are deallocated) if I'm wrapping e.g. Python or COM objects?
s
svyatoslav.scherbina
09/01/2017, 11:10 AM
Currently the feature is built-in to the compiler and implemented only for Objective-C wrappers, but if necessary it can be generalized and exposed to Kotlin code later.