MCPcopy Create free account
hub / github.com/bailey27/cppcryptfs / ReleaseIoBuffer

Method ReleaseIoBuffer

libcppcryptfs/file/iobufferpool.cpp:127–143  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

125}
126
127void IoBufferPool::ReleaseIoBuffer(IoBuffer * pBuf)
128{
129
130 if (!pBuf)
131 return;
132
133 if (pBuf->m_bIsFromPool) {
134 lock_guard<mutex> lock(m_mutex);
135 try {
136 m_buffers.push_front(pBuf);
137 } catch (const std::bad_alloc&) {
138 delete pBuf;
139 }
140 } else {
141 delete pBuf;
142 }
143}
144
145

Callers 2

ReadMethod · 0.80
WriteMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected