Hi.. I’m in a need of a weakly referenced object like the one in java (WeakReference) how can I achieve that in KMP?
In other words I need some objects to be cleared by the garbage collector when it’s weakly reachable
t
Tijl
11/24/2020, 8:59 PM
that depends on which platforms you are targeting, Kotlin/Native has kotlin.native.ref / WeakReference , and JS has it’s own WeakRef, but that’s not supported in all browser