Running code when the program closes

Override Shutdown() function in a custom GameInstance class: