The file is deleted on the last call which closes the file. A program cannot open a file which has already been removed.