Added applicationWillTerminate to cpp-template-default.