Hi, everyone:
Sorry to bother you, but I need some help here.
I am working on a reference management project like endnote or jabref. Generally, the main window has two panels. The left panel is a item list and the right panel is a PDF file viewer. When I click an item, it becomes the "current item" and the corresponding attached PDF file stored in a local attachment directory is shown by the PDF viewer on the right panel. The PDF viewer is extracted from TexMaker project which uses poppler library to handle PDF files. When I try to delete the "current item" on the left panel, of course I would like to delete the corresponding PDF attachment as well. However, the PDF file for the "current item" is opened by the PDF viewer, which means it is in use and I couldn't delete it. On Windows, I would get a message like "Could not delete ***: it is been used by another person or program".

So, could you give me some hints about deleting file even if it is in use? My PDF viewer widget doesn't have a "close file" function and I really don't want to dive into the source code of Texmaker or Poppler.

Thanks a lot!