code: private void unregisterTask(final ExecutionVertexID id) {
  
  		// Task de-registration must be atomic
  		synchronized (this) {
  
  			final Task task = this.runningTasks.remove(id);
  			if (task == null) {
  				LOG.error("Cannot find task with ID " + id + " to unregister");
  				return;
  			}
  
  			// remove the local tmp file for unregistered tasks.
  			for (Entry<String, String> e: DistributedCache.getCachedFile(task.getEnvironment().getJobConfiguration())) {
  				this.fileCache.deleteTmpFile(e.getKey(), task.getJobID());
  			}
  			// Unregister task from the byte buffered channel manager
  			this.channelManager.unregister(id, task);
  
  			// Unregister task from profiling
  			task.unregisterProfiler(this.profiler);
  
  			// Unregister task from memory manager
  			task.unregisterMemoryManager(this.memoryManager);
  
  			// Unregister task from library cache manager
  			try {
  				LibraryCacheManager.unregister(task.getJobID());
  			} catch (IOException e) {
  				if (LOG.isDebugEnabled()) {
  					LOG.debug("Unregistering the job vertex ID " + id + " caused an IOException");
  				}
  			}
  		}
  	}
docs: Unregisters a finished or aborted task.
  
  @param id
  the ID of the task to be unregistered