When a task stops or is killed then a notification signal is sent to the libary notification function which will automatically the following actions:
All Buffers allocated to the task are released
All file locks made by the task are released
All File handles allocated to the task are closed
Any file copy initiated by the task is cancelled.
NOTE: The above actions will also be carried out if a restart statement is encountered or if the task chains to another task (since this is equivalent to starting a new task then killing the calling task).