If you did not unlock the memory, then mmap, which you did with the file pointer, does not allow you to delete the file (although you do not see it). You should always unlock the memory before deleting the link file.
[This refers to the old UNIX trick - open the file as soon as you have the file descriptor, and then disconnect the file - you have a file with which you can do something, but no one can see, and if you completely destroy the file away!]
source
share