react-native-mmkv
react-native-mmkv copied to clipboard
Possible memory leak
I'm running some analysis on my business' application and came through this data from xCodes Instrument on Memory Leak analyzer mode:
It seems like there's a memory leak with mmkv's get function:
Xcode's Instrment's Profile data: https://drive.google.com/file/d/10TX6kSu9b8Y8jtHkaeLHrFDQeY9ufYWt/view?usp=sharing Currently using [email protected] and [email protected]
Oh that's interesting! Could you profile if this happens on Android too?
i got same results on IOS, is it possible to introduce a something like "release memory" function example in FastImage we use FastImage.clearMemoryCache()
after the component unmount to clear the image from memory and use the disk cache
Yea I think this is a leak, and adding a clear function is a bit hacky. I'll need to find the root cause for this, but if this is in MMKV's codebase then maybe we should create an issue there?
Possibly related? https://github.com/mrousavy/react-native-mmkv/issues/440
@mrousavy Hi, any updates about this? We are ready to migrate to mmkv but we are worried about this 😿
Hey! Sorry I cannot reproduce the issue here and it has been inactive for a while. I am going over issues right now and want to keep the repo clean - so I'm closing this for now, if anyone can post a reproduceable example here I can re-open and take a look :)