Code example for Set

Methods: clear

0
    /** 
     * Deletes all allocated temporary directories asynchronously. 
     */ 
    public synchronized void disposeAsync() { 
        final Set<File> tbr = new HashSet<File>(tmpDirectories);
        tmpDirectories.clear();
 
        new Thread("Disposing "+base) {
            public void run() { 
                for (File dir : tbr)
                    try { 
                        new FilePath(dir).deleteRecursive();
                    } catch (IOException e) {
                        e.printStackTrace();
                    } catch (InterruptedException e) {
                        e.printStackTrace();
                    } 
            } 
        }.start();
    }