on-exit-leak-free

Execute a function on exit without leaking memory, allowing all objects to be garbage collected

signal-exit

when you want to fire an event no matter how a process exits.