asMultiplatform
Wraps a JS WeakMap into a multiplatform WeakMap.
The resulting weak map has similar properties as the JS map. Most importantly:
The keys are held weakly.
The values are held strongly.
Type restrictions
The returned map can accept null as a key even though the JS map would throw an error. However, all mappings with a null key are ignored. That is, they behave as if they were immediately deleted by the GC.
The underlying map doesn't support JS primitive types, like String, Int, Double and Boolean.
Wraps a JVM WeakHashMap into a multiplatform WeakMap.
The resulting weak map has the exact same properties as the JVM map. Most importantly:
The keys are held weakly.
The values are held strongly.
The map is not thread-safe.