tommiionfire / proxy-vole

Automatically exported from code.google.com/p/proxy-vole
0 stars 0 forks source link

The native DLL is not being deleted when the JVM exits #14

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The problem is that the DLL is locked and can't be deleted. I changed the code 
to create a "unique" filename, that is stable. The code will delete the file if 
it exists on startup and then create it again from scratch. I also added a 
finally block to the creation so the streams will be closed properly in case of 
an exception.

Original issue reported on code.google.com by jeff%sta...@gtempaccount.com on 23 Mar 2011 at 4:12

Attachments:

GoogleCodeExporter commented 9 years ago
Hi,
The problems with this approach arise when you have two programs that use proxy 
vole and run in paralell. The second one that is started will not be able to 
delete the existing file (as it is already in use) and will also fail to 
extract its version of the dll to this temp file name so the deleteOnClose was 
the best way to go in my opinion. But what we could do is search all proxy vole 
dll temp files and delete them if not locked. This should with the next start 
up delete all old temp files that are no longer in use. This would prevent the 
sum of files but still one old file may remain.

The stream cleanup code is OK and I will integrate that.

Any other ideas are welcome. 

Have fun,
- Rossi

Original comment by rosstaus...@googlemail.com on 24 Mar 2011 at 2:51

GoogleCodeExporter commented 9 years ago

Original comment by rosstaus...@googlemail.com on 24 Mar 2011 at 2:51

GoogleCodeExporter commented 9 years ago
Hi,
I added some cleanup code to the library to get rid of old temp files.
This will not completely fix this but will reduce the problem to one or two 
remaining temp files.
These changes are in the repository and will make it into the next release once 
I have tested everything and build a new version.

Have fun,
- Rossi

Original comment by rosstaus...@googlemail.com on 17 May 2011 at 7:56

GoogleCodeExporter commented 9 years ago
The code is in the repository for a while now.
I have build a new release today that contains the fix for this.

Have fun,
- Rossi

Original comment by rosstaus...@googlemail.com on 2 Nov 2011 at 9:24