krtko
09/06/2018, 8:16 PMweak var something: Something? = someRef //of type WeakReference<Something>
if (something == null) { /*True if something's reference is null*/ }
var inferredWeakSomething = something //of type WeakReference<Something>
strong var strongSomething = something //of type Something?
elizarov
09/06/2018, 8:19 PMvar something: Something by weak(someRef)
Dico
09/06/2018, 8:33 PMThreadLocal
. A simple ThreadLocal
subclass implementing ReadWriteProperty<Any?, T>
that is returned from some overloaded functions named threadLocal
would be cool to have. Would a pull request into the stdlib repository be the right approach?elizarov
09/06/2018, 8:49 PMDico
09/06/2018, 8:56 PM