MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / close

Method close

source/core/StarBTreeDatabase.cpp:306–318  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

304}
305
306void BTreeDatabase::close(bool closeDevice) {
307 WriteLocker writeLocker(m_lock);
308 if (m_open) {
309 if (!tryFlatten())
310 doCommit();
311
312 m_indexCache.clear();
313
314 m_open = false;
315 if (closeDevice && m_device && m_device->isOpen())
316 m_device->close();
317 }
318}
319
320BTreeDatabase::BlockIndex const BTreeDatabase::InvalidBlockIndex;
321uint32_t const BTreeDatabase::HeaderSize;

Callers

nothing calls this directly

Calls 2

clearMethod · 0.45
isOpenMethod · 0.45

Tested by

no test coverage detected