Hi.. I’m in a need of a weakly referenced object l...
# multiplatform
w
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
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
👍 1