Consider a frozen object with unique properties th...
# kotlin-native
j
Consider a frozen object with unique properties that performs calculations that you wish to cache the results of. Where would you recommend caching the results? The object itself is frozen, so I can't store anything there. There are no guarantees about how long it will stick around. As such, I can't use a thread-local hash map because it would retain strong references. Is there a weak map implementation that could at least cache per-thread?
m
c
I think that should only be used for exceptional cases though.