coletz
03/21/2020, 3:19 PMLuoqiaoyou
03/21/2020, 3:33 PMcoletz
03/21/2020, 3:59 PMrusshwolf
03/21/2020, 4:11 PMcoletz
03/21/2020, 4:16 PMkpgalligan
03/21/2020, 5:24 PMcoletz
03/21/2020, 5:46 PMrusshwolf
03/22/2020, 4:26 PMensureNeverFrozen()
on it at initialization and you'll get a crash when it gets frozen telling you what freezes itkpgalligan
03/22/2020, 4:30 PMcoletz
03/22/2020, 4:30 PMkpgalligan
03/22/2020, 4:32 PMensureNeverFrozen
on IdsProvider
, `isFrozen`will always return false. `ensureNeverFrozen`prevents it from freezing.coletz
03/22/2020, 4:36 PMclass Test {
init {
test1()
}
private val testMap1 = frozenHashMap<String, String>()
private fun test1() {
"test1.begin".log()
testMap1["a"] = "hi1"
"test1.end".log()
}
}
executing this on iOS I get the first log printed (Any?.log()
is just a println on iOS) then a EXC_BAD_ACCESS
. So probably I'm not really understanding how to use the frozenHashMap
on the iOS side I'm just instantiating a Test object in the AppDelegate's application method
Edit: moving the test1() method call outside the init and calling it from iOS side seems to fix... I can't understand what is different in that, but seems like it's actually different
Edit2: aaaaand my brain is completely fucked. Called again inside the init, now it's working. I have literally no idea about what is going on, probably something was cached and idk, just trying to justify something that is no-sense to me. Thanks everyone anyway for your support guyskpgalligan
03/22/2020, 6:18 PMTest
code? My only guess on the previous was that `testMap1`wasn’t properly initialized when init was calledcoletz
03/22/2020, 6:23 PMkpgalligan
03/22/2020, 6:36 PM