(&mut self)
| 1852 | |
| 1853 | impl<T: InstanceLayout> Drop for OwnedInstance<T> { |
| 1854 | fn drop(&mut self) { |
| 1855 | unsafe { |
| 1856 | let layout = self.get().layout(); |
| 1857 | ptr::drop_in_place(self.instance.as_ptr()); |
| 1858 | alloc::alloc::dealloc(self.instance.as_ptr().cast(), layout); |
| 1859 | } |
| 1860 | } |
| 1861 | } |
| 1862 | |
| 1863 | #[derive(Debug)] |