Skip to main content

at_binary_exit

Function at_binary_exit 

Source
pub unsafe fn at_binary_exit(cb: extern "C" fn())
Expand description

Registers a raw function to be called at binary exit time.

Corresponds to atexit in C.

Unsupported on Windows platforms: the platform’s libc atexit tracks a set of functions per module.

§Safety

Rust does not provide any safety guarantees about life-before-main or life-after-main. Ordering of destructors is not guaranteed, nor that a destructor will be called at all.