mirror of
https://github.com/Tencent/MMKV.git
synced 2026-10-17 04:30:56 +08:00
add back lazy-load on mmkv init
This commit is contained in:
+2
-2
@@ -119,10 +119,10 @@ MMKV::MMKV(const string &mmapID, MMKVMode mode, string *cryptKey, MMKVPath_t *ro
|
||||
m_exclusiveProcessLock->m_enable = m_isInterProcess;
|
||||
|
||||
// sensitive zone
|
||||
{
|
||||
/*{
|
||||
SCOPED_LOCK(m_sharedProcessLock);
|
||||
loadFromFile();
|
||||
}
|
||||
}*/
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -81,10 +81,10 @@ MMKV::MMKV(const string &mmapID, int size, MMKVMode mode, string *cryptKey, stri
|
||||
m_exclusiveProcessLock->m_enable = m_isInterProcess;
|
||||
|
||||
// sensitive zone
|
||||
{
|
||||
/*{
|
||||
SCOPED_LOCK(m_sharedProcessLock);
|
||||
loadFromFile();
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
MMKV::MMKV(const string &mmapID, int ashmemFD, int ashmemMetaFD, string *cryptKey)
|
||||
@@ -130,10 +130,10 @@ MMKV::MMKV(const string &mmapID, int ashmemFD, int ashmemMetaFD, string *cryptKe
|
||||
m_exclusiveProcessLock->m_enable = m_isInterProcess;
|
||||
|
||||
// sensitive zone
|
||||
{
|
||||
/*{
|
||||
SCOPED_LOCK(m_sharedProcessLock);
|
||||
loadFromFile();
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
MMKV *MMKV::mmkvWithID(const string &mmapID, int size, MMKVMode mode, string *cryptKey, string *rootPath,
|
||||
|
||||
Reference in New Issue
Block a user