MJegorovas
04/03/2025, 1:03 PMval array = Random.nextBytes(1000000)
for (i in 0..10000) {
array.usePinned {
NSData.create(bytes = it.addressOf(0), length = array.size.convert())
}
}MJegorovas
04/03/2025, 1:05 PMGC.collect call inside loop does nothing, because as I understand NSData objects are not allocated in heap?ephemient
04/03/2025, 1:08 PMMJegorovas
04/03/2025, 1:18 PMautoreleasepool before and it didn't help sadly.MJegorovas
04/03/2025, 1:38 PMautoreleasepool with kotlin.native.binary.objcDisposeOnMain=false helped though, thanks!MJegorovas
04/03/2025, 1:42 PM