Scene:
A temporary folder is generated when the data is downloaded in the program. There are some TXT and other format files inside the clip.
After the data download, you need to delete this temporary folder, but always delete the dirty, there will always be a file residue.
The net found the cause of the problem:
Content from: u012102536 's Blog
Original address: http://blog.csdn.net/u012102536/article/details/53583455
Cause: The temporary file object has not been dereferenced in the Java Virtual Machine (JVM), although it appears that there are no variables pointing to the temporary file object, but it is not yet urgent to be automatically reclaimed by the garbage collector to dereference. Because the JVM also occupies a temporary file object, the deletion cannot succeed. Solution: A garbage collection is performed before the file is deleted, releasing temporary file object references from the Java virtual machine.
System.GC (); //Perform a garbage collection File.delete ();
Java Call Delete File method Delete file, but delete dirty