I created a WeakHashMap
in Kotlin and for some reason, I am unable to call put
it, it won't resolve.
val dataMap: Map<Int, MyData> = WeakHashMap<Int, MyData>()
dataMap.put(myInt, myData) // doesn't resolve
Is there a Kotlin equivalent for a WeakHashMap
?