code: function exitHook (context, func) {
  	if (!func) {
  		func = context;
  		context = func;
  	}
  
  	if (typeof func === 'function') {
  		subs.push([func, context])
  	}
  
  	return exitHook;
  }
docs: Adds a new function to execute when the application is exiting.