Best way to detect program termination?

Hi!

Is there a juce way to know whether the user has requested to terminate the application?

Thanks.

JUCEApplication::systemRequestedQuit