MCPcopy Create free account
hub / github.com/Tencent/MMKV / doCleanMemoryCache

Method doCleanMemoryCache

Core/MemoryFile_Win32.cpp:251–261  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

249}
250
251void MemoryFile::doCleanMemoryCache(bool forceClean) {
252 if (m_ptr) {
253 UnmapViewOfFile(m_ptr);
254 m_ptr = nullptr;
255 }
256 if (m_fileMapping) {
257 CloseHandle(m_fileMapping);
258 m_fileMapping = nullptr;
259 }
260 m_diskFile.close();
261}
262
263bool MemoryFile::openIfNeeded() {
264 if (!m_diskFile.isFileValid()) {

Callers

nothing calls this directly

Calls 1

closeMethod · 0.45

Tested by

no test coverage detected