07/20/2022, 11:41 AM
Testing against memory leaks in Kotlin Native The following Kotlin Native test code uses weak references and manual triggering of garbage collection in the hope of ensuring objects have been reclaimed (rationale: if this works correctly then this mechanism can then be used in more complex scenarios to ensure various components don't hold to references they no longer need. Alternative approaches to achieve this goal are out of scope for this question and will not be accepted as answers, but are welcome in comments!): import...