MCPcopy Create free account
hub / github.com/apache/arrow-rs / drop

Method drop

arrow-buffer/src/bytes.rs:198–207  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

196impl Drop for Bytes {
197 #[inline]
198 fn drop(&mut self) {
199 match &self.deallocation {
200 Deallocation::Standard(layout) => match layout.size() {
201 0 => {} // Nothing to do
202 _ => unsafe { std::alloc::dealloc(self.ptr.as_ptr(), *layout) },
203 },
204 // The automatic drop implementation will free the memory once the reference count reaches zero
205 Deallocation::Custom(_allocation, _size) => (),
206 }
207 }
208}
209
210impl std::ops::Deref for Bytes {

Callers

nothing calls this directly

Calls 2

sizeMethod · 0.45
as_ptrMethod · 0.45

Tested by

no test coverage detected