In my experience deleting files in Linux does not always free the space instantly, I guess the garbage collection is run as a background task.
There's no garbage collection running as a background task.
There are two cases where space won't be freed when you delete a file. One is where there are multiple links to a file (i.e. where there are two or more directory entries, but only one file), and the other is when there is a process running which has an open file descriptor to the file - in which case the file becomes an anonymous file (i.e occupies space, but has no directory entries). When the last process which has an open file descriptor closes the descriptor, or exits, then the space will be freed.