Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS Memory Leak Issue #23

Closed
1 task done
NilayDagdemir opened this issue Jun 10, 2021 · 2 comments
Closed
1 task done

iOS Memory Leak Issue #23

NilayDagdemir opened this issue Jun 10, 2021 · 2 comments

Comments

@NilayDagdemir
Copy link

NilayDagdemir commented Jun 10, 2021

New Issue Checklist

  • I searched for existing GitHub issues

Info

I'm using KVault (version 1.2.1) for a Kotlin Multiplatform project.

Describe the bug

kVault iOS main part creates many memory leaks in our project. Most of the leaked objects have a type of CFDictionaryCreateMutable. Here are the places of the leaks:

>  KVault/kvault/src/iosMain/kotlin/com/liftric/kvault/KVault.kt:188   
>  KVault/kvault/src/iosMain/kotlin/com/liftric/kvault/KVault.kt:174
>  KVault/kvault/src/iosMain/kotlin/com/liftric/kvault/KVault.kt:176
>  KVault/kvault/src/iosMain/kotlin/com/liftric/kvault/KVault.kt:28
>  KVault/kvault/src/iosMain/kotlin/com/liftric/kvault/KVault.kt:158
>  KVault/kvault/src/iosMain/kotlin/com/liftric/kvault/KVault.kt:176
>  KVault/kvault/src/iosMain/kotlin/com/liftric/kvault/KVault.kt:116
>  KVault/kvault/src/iosMain/kotlin/com/liftric/kvault/KVault.kt:162

...
and so on. I think the problem occurs because of these CF[TYPE]s.

Please note that kVault does not create any memory leaks in Android.

### Expected behavior
kVault shouldn't create any memory leaks in iOS.

@benjohnde
Copy link
Member

Thanks for the contribution @NilayDag! Nice find, we've sadly forgotten to release the core foundation references. Fix is subject to release very soon! Glad you are using or at least trying out KVault :) 👍 🚀 🎉

@gaebel
Copy link
Contributor

gaebel commented Jun 10, 2021

We've just published a new version containing the memory leak fix. It will probably take around 1 to 2 hours until the release gets synced to MavenCentral. You can add the following repository to access the release now:

repositories {
    maven(url = "https://s01.oss.sonatype.org/content/repositories/releases")
}

@gaebel gaebel closed this as completed Jun 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants