MCPcopy Index your code
hub / github.com/aiscriptdev/aiscript / dealloc

Method dealloc

aiscript-arena/src/types.rs:71–78  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

69 /// pointers again.
70 #[inline(always)]
71 pub(crate) unsafe fn dealloc(self) {
72 unsafe {
73 let layout = self.header().vtable().box_layout;
74 let ptr = self.0.as_ptr() as *mut u8;
75 // SAFETY: the pointer was `Box`-allocated with this layout.
76 alloc::alloc::dealloc(ptr, layout);
77 }
78 }
79}
80
81pub(crate) struct GcBoxHeader {

Callers 1

free_gc_boxFunction · 0.80

Calls 3

vtableMethod · 0.80
headerMethod · 0.80
as_ptrMethod · 0.45

Tested by

no test coverage detected