<Tracking object lifetimes in Kotlin Native> In my...
# forum
r
Tracking object lifetimes in Kotlin Native In my multiplatform project I need to work with bignums. In the JVM and JS targets, this is easy and I’ve created a wrapper around the built-in bignum functionality on those platforms. On Linux, I leverage the gmp library to achieve the same goal. In gmp, when you’re done with a value, you need to call mpz_clear to release the memory used by the bignum. I’ve noticed that the finalize function does not work in Kotlin Native, so what is the solution here? Due to the nature of the project,...