[K/N] A bit more on the new MM

This commit is contained in:
Alexander Shabalin
2021-09-01 06:54:09 +00:00
committed by Space
parent f0f5e11e72
commit ed0b65e19c
+4
View File
@@ -11,6 +11,8 @@ In particular:
* `Worker.executeAfter` will no longer require `operation` to be frozen, and `Worker.execute` will no longer require
`producer` to return an isolated object subgraph.
Also, reference cycles containing `AtomicReference` and `FreezableAtomicReference` do not cause memory leaks anymore.
A few caveats:
* As with the previous MM, memory is not reclaimed eagerly: an object is reclaimed only when GC happens. This extends
to Swift/ObjC objects that crossed interop boundary into Kotlin/Native.
@@ -72,6 +74,8 @@ kotlin.targets.withType(KotlinNativeTarget::class.java) {
}
```
If `kotlin.native.isExperimentalMM()` returns `true`, you've successfully enabled the new memory model.
### Update the libraries
To fully take advantage of the new MM, newer versions of libraries were released: