never close MetaFile on clearMemoryCache() #1117 #1061

This commit is contained in:
guoling
2023-08-11 12:49:42 +08:00
parent 7eb562495b
commit 6734567f8a
2 changed files with 14 additions and 3 deletions
+1 -1
View File
@@ -201,7 +201,7 @@ void MemoryFile::reloadFromFile() {
if (isFileValid()) {
MMKVWarning("calling reloadFromFile while the cache [%s] is still valid", m_diskFile.m_path.c_str());
MMKV_ASSERT(0);
clearMemoryCache();
doCleanMemoryCache(false);
}
if (!m_diskFile.open()) {