Hi so 1.9.20 got released I noticed this about <...
# multiplatform
a
Hi so 1.9.20 got released I noticed this about memory allocator , How can i enable it for kotlin 1.9.10 ? (i don't want to migrate to 1.9.20 as of now)
p
https://kotlinlang.org/docs/whatsnew19.html#preview-of-custom-memory-allocator
-Xallocator=custom
Copy code
kotlin {
    macosX64("native") {
        binaries.executable()

        compilations.configureEach {
            compilerOptions.configure {
                freeCompilerArgs.add("-Xallocator=custom")
            }
        }
    }
}
🙌 2
a
Thanks ! @p-schneider , i applied it like this
Copy code
listOf(
        iosX64(),
        iosArm64(),
        iosSimulatorArm64()
    ).forEach {
        it.compilations.configureEach {
            compilerOptions.configure {
                freeCompilerArgs.add("-Xallocator=custom")
            }
        }
    }
This resolved over 200+ memory leaks ! , the ios team were scolding me over them 🥹