FileLock - how to release locks on files no longer used.
807591Mar 17 2008 — edited Mar 17 2008Hi Everyone,
Well its a bad problem to begin with, but I have managed to create this monster somehow! I am trying to implement exclusive locks on files when they are accessed. I am using FileLock/ FIleChanell lock() method for this purpose. The thing is my release lock code is not getting called at the right times. So when you close the file, the lock isn't relased. Since I am testing some use cases, there are lot of file with somewhat "orphan" locks. Is there anyway to release these locks on files which are no longer used? I am on Windows XP ( I hate it) ! I don't know how to do something like this.
Thanks in advance ! This prob is drivng me nuts..