When to show a toast message in Settings page

In a Settings page, what would be an acceptable practice when it comes to showing toast messages to the user to notify about changes applied?

  1. On exiting after change of settings in a particular section
  2. On exiting the entire settings page after changes