The process cannot access the file because it is being used by another process – using static class

I get the error “The process cannot access the file because it is being used by another process” when I attempt to delete the files I just uploaded (this is at least a few seconds after the files were uploaded, so I am sure they are finished writing). Any ideas why this occurs? PS: The thumbnails I generate delete without a problem, but the originals are locked somehow.