<p>Usage of method File#deleteOnExit() is not recommended for following reasons:</p>
<ul>
  <li>The deletion occurs only in case of normal JVM shutdown but not when the JVM is killed or crashes</li>
  <li>For each file handler, the memory associated to this handler is released only at the end of the process</li>
</ul>