Mirko Sertic wrote:
After the renderer has done its work, i want to delete my temp
files. I can delete every temp file except the image files!!!
(the java java.io.File.delete() method gives a false as return
value, so the the file is not deleted and is still alive in
my temp dir!!!).
The files are automatically closed when the corresponding Java
objects are garbage collected. This will happen sooner or later,
so you can simply try to delete *all* temporary image files and
ignore the ones which are not yet closed.
Another possibility is to explicitely force garbage collection
check the JavaDoc for the System or Runtime class. Be careful
to set references to the driver object to null beforehand:
System.gc(); // or whatever