Join Slack
Powered by
is there a weak-reference ReadWriteProperty built-...
# announcements
g
groostav
08/27/2018, 10:42 PM
is there a weak-reference ReadWriteProperty built-in to kotlin?
k
karelpeeters
08/27/2018, 10:46 PM
What exactly do you want?
g
groostav
08/27/2018, 10:59 PM
val cache: MyType by weakRef { getter() }
?
groostav
08/27/2018, 11:00 PM
i suppose also theres no reason for the initializer to be lazy,
by weakRef(getter())
works too
l
louiscad
08/28/2018, 6:20 AM
@groostav
Here's a read only version:
https://gist.github.com/LouisCAD/7ce3a30cb88c27858b12d5f26c118b0b
2
Views
Open in Slack
Previous
Next