Andy Victors
05/14/2019, 5:16 PMobjects
being frozen - technical limitation or a language concept?
What us then the alternative of keeping the global modifiable list of, say, users in the app?Marko Mitic
05/14/2019, 5:22 PMAndy Victors
05/14/2019, 5:24 PMMarko Mitic
05/14/2019, 5:31 PMobobo
05/14/2019, 5:52 PMvar
, or setting a mutable object (like a MutableList
) as a field?Andy Victors
05/14/2019, 7:00 PMprivate val fetchers: ArrayList<DataSourceFetcher> = ArrayList()
. Will try the same using `var`and report.Casey Brooks
05/14/2019, 8:24 PMobject
for mutable singletons is to use AtomicReference
or other atomic data structures. I was fighting this a while ago and that really is the only route, unfortunatelyobobo
05/14/2019, 8:28 PMilya.gorbunov
05/14/2019, 9:20 PMobobo
05/14/2019, 9:21 PMAndy Victors
05/16/2019, 11:23 AMAtomicReference
is not available for me? Kotlin '1.3.30'Marko Mitic
05/16/2019, 12:32 PMAndy Victors
05/16/2019, 12:33 PMMarko Mitic
05/16/2019, 12:34 PMAndy Victors
05/23/2019, 1:45 PMOnce an object is frozen, all its children objects are also frozen.Is there any option to distinguish between real children (owned) and referenced objects? Currently if I pass some object in constructor to the frozen object, that one is also get frozen which is not what I want.