MCPcopy Create free account
hub / github.com/hashintel/hash / drop

Method drop

libs/darwin-kperf/src/sampler/thread.rs:173–183  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

171
172impl<const N: usize> Drop for ThreadSampler<'_, N> {
173 fn drop(&mut self) {
174 let _result = self.stop();
175
176 let kpep_vt = self.sampler.kperfdata.vtable();
177 // SAFETY: config was allocated by kpep_config_create in ll_start and
178 // has not been freed. The kperfdata framework is still loaded because
179 // we hold a reference to the Sampler which owns it.
180 unsafe {
181 (kpep_vt.kpep_config_free)(self.config.as_ptr());
182 }
183 }
184}
185
186impl<const N: usize> fmt::Debug for ThreadSampler<'_, N> {

Callers

nothing calls this directly

Calls 2

vtableMethod · 0.80
stopMethod · 0.65

Tested by

no test coverage detected