Quick question, is there any K/Mp implementation of WeakReference?
j
Quick question, is there any K/Mp implementation of WeakReference?
๐Ÿ‘Œ 1
๐Ÿค” 1
โž• 1
d
j
As far as I know there is no WeakReference in Stately
There is only AtomicReference
I wrote my own implementation, most likely I will post it somewhere if there is no better alternative available
k
I could add one. Assume the implementation is pretty straightforward?
j
I can only speak for jvm and native, but yeah just a few lines of code
l
There's one already in Kotlin/Native
k
For common code
l
It seems JS doesn't support weak references natively, so you'll be able to create a common definition only if you don't support JS, or don't need weak reference on JS target.
k
Yeah, itโ€™s an issue