Exit function does not deallocate task memory except for the data block, and does not are about the exit code except for logging.