'Called when an application context is popped.  This works pretty
much the same as :meth:`do_teardown_request` but for the application
context.
.. versionadded:: 0.9'

def do_teardown_appcontext(self, exc=_sentinel):

    if (exc is _sentinel):
        exc = sys.exc_info()[1]
    for func in reversed(self.teardown_appcontext_funcs):
        func(exc)
    appcontext_tearing_down.send(self, exc=exc)
