@Override
 protected void finalize() {
   // System.out.println("finalize TempMultiFileStringList: " + this.hashCode());
   for (String name : list) {
     File f = new File(dir, name);
     if (f.exists() && f.delete() == false) {
       System.err.println("cannot delete a temp File:" + f.getAbsolutePath());
     }
   }
   try {
     super.finalize();
   } catch (Throwable e) {
     e.printStackTrace();
   }
 }
Exemplo n.º 2
0
 /**
  * a slow function in java, but the only other way is for the users of this list to do it, and
  * since its used as a normal java.util.List, they probably wont know to do that.
  */
 protected void finalize() throws Throwable {
   acyc.oneLessRefFromOutside(pointer);
   super.finalize();
 }