When you are deleting a file in Windows, sometimes you can get errors like "Cannot delete file: Access is denied", "The source or destination file may be in use", "The file is in use by another program or user. Make sure the disk is not full or write-protected and that the file is not currently in use".
This happens if the file that is being deleted is still loaded in memory. So before deleting it, it has to be unloaded from memory. Unlocker is a small freeware which just does that. Once its installed, it adds itself in right-click context menu. One has to just right-click on the "locked" file and click "Unlock". This opens the Unlocker through which the file can be unlocked. Afterwards, the file can be deleted easily.
Get it here.