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

Method close

Core/MemoryFile.cpp:107–116  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

105}
106
107void File::close() {
108 if (isFileValid()) {
109 MMKVInfo("closing fd[%d], %s", m_fd, m_path.c_str());
110 if (::close(m_fd) == 0) {
111 m_fd = -1;
112 } else {
113 MMKVError("fail to close [%s], %d(%s)", m_path.c_str(), errno, strerror(errno));
114 }
115 }
116}
117
118size_t File::getActualFileSize() const {
119# ifdef MMKV_ANDROID

Callers 2

cleanMayflyFDMethod · 0.45
doCleanMemoryCacheMethod · 0.45

Calls 2

closeFunction · 0.85
isFileValidFunction · 0.50

Tested by

no test coverage detected