MCPcopy Create free account
hub / github.com/erans/pgsqlite / drop

Method drop

src/protocol/buffer_pool.rs:365–375  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

363
364impl Drop for PooledBytesMut {
365 fn drop(&mut self) {
366 if let Some(buffer) = self.buffer.take() {
367 // Return buffer to pool through the BufferPool method
368 // We need to reconstruct the BufferPool temporarily to call return_buffer
369 let pool = BufferPool {
370 inner: Arc::clone(&self.pool),
371 config: self.config.clone(),
372 };
373 pool.return_buffer(buffer);
374 }
375 }
376}
377
378/// Global buffer pool instance for shared use across the application

Callers

nothing calls this directly

Calls 3

takeMethod · 0.80
return_bufferMethod · 0.80
cloneMethod · 0.45

Tested by

no test coverage detected