(&mut self)
| 196 | impl 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 | |
| 210 | impl std::ops::Deref for Bytes { |