protected Object remove() { Object obj = null; while (size() > 0) { obj = data.removeFirst(); if (obj instanceof LeasedReference) { LeasedReference ref = (LeasedReference) obj; obj = ref.get(); if (obj == null) { continue; } ref.discard(); } break; } return obj; }
protected Object remove() { Object obj = null; File f = null; while (size() > 0) { obj = getFirst(); if (data.size() > 0) data.removeFirst(); f = new File((String) stored.removeFirst()); f.delete(); if (obj instanceof LeasedReference) { LeasedReference ref = (LeasedReference) obj; obj = ref.get(); if (obj == null) { continue; } ref.discard(); } break; } return obj; }