You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a memory leak in file kotlin/wallet-core-kotlin/src/iosMain/generated/com/trustwallet/core/Base58.kt (the iOS generated code for Base58.decode):
package com.trustwallet.core
actual object Base58 {
// ......
actual fun decode(string: String): ByteArray? =
TWBase58Decode(string.toTwString()).readTwBytes() // toTwString and readTwBytes leak memory!
// ......
}
Expected behavior
The memory needs to be released.
Screenshots
Run Base58.decode 100000 times, it takes up to 200 MB of memory:
Additional context
This issue is common and not specific to Base58.decode.
The text was updated successfully, but these errors were encountered:
Describe the bug
There is a memory leak in file kotlin/wallet-core-kotlin/src/iosMain/generated/com/trustwallet/core/Base58.kt (the iOS generated code for Base58.decode):
Expected behavior
The memory needs to be released.
Screenshots
![Xnip2024-09-18_15-25-56](https://private-user-images.githubusercontent.com/2391796/368471430-83dcf6ea-28b7-426c-a8d2-937ef306da1c.jpg?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1OTU5OTIsIm5iZiI6MTczOTU5NTY5MiwicGF0aCI6Ii8yMzkxNzk2LzM2ODQ3MTQzMC04M2RjZjZlYS0yOGI3LTQyNmMtYThkMi05MzdlZjMwNmRhMWMuanBnP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxNSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTVUMDUwMTMyWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9YjcxN2QzNmE2OGI4ZTkzNjVhYjJmNTcxMDM3Y2E5YTNjNzZmZTMyNGI2M2IwMzVmMWI5OTk2OTE3MjFjZDRkNSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.UJJtUmQiUbaHPBfKy9le-MSolG1uBVy7AEjJpEYrgt8)
Run Base58.decode 100000 times, it takes up to 200 MB of memory:
Additional context
This issue is common and not specific to Base58.decode.
The text was updated successfully, but these errors were encountered: