Is there a way to call a function on app close?

No code, just that simple question :slight_smile: