Function destroy

Source
unsafe extern "C" fn destroy<T>(ptr: *mut u8)
🔬This is a nightly-only experimental API. (thread_local_internals)
Expand description

Transition an Alive TLS variable into the Destroyed state, dropping its value.

§Safety

  • Must only be called at thread destruction.
  • ptr must point to an instance of Storage<T, ()> and be valid for accessing that instance.