MCPcopy Create free account
hub / github.com/comaps/comaps / Close

Method Close

libs/coding/files_container.cpp:136–156  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

134}
135
136void MappedFile::Close()
137{
138#ifdef OMIM_OS_WINDOWS
139 if (m_hMapping != INVALID_HANDLE_VALUE)
140 {
141 CloseHandle(m_hMapping);
142 m_hMapping = INVALID_HANDLE_VALUE;
143 }
144 if (m_hFile != INVALID_HANDLE_VALUE)
145 {
146 CloseHandle(m_hFile);
147 m_hFile = INVALID_HANDLE_VALUE;
148 }
149#else
150 if (m_fd != -1)
151 {
152 close(m_fd);
153 m_fd = -1;
154 }
155#endif
156}
157
158MappedFile::Handle MappedFile::Map(uint64_t offset, uint64_t size, std::string const & tag) const
159{

Callers 2

ReconnectMethod · 0.45
ShutdownMethod · 0.45

Calls 1

clearMethod · 0.45

Tested by

no test coverage detected