isWeakSupported

true when this platform has real weak references, so the collector can free a referent.

false on Wasm and on JS runtimes older than ES2021. There WeakRef holds its referent strongly, and get returns it until clear.

val cache = if (WeakRef.isWeakSupported) WeakCache() else SizeLimitedCache(8)