diff src/org/tmatesoft/hg/util/PathPool.java @ 231:1792b37650f2

Introduced access to conflict resolution information (merge state)
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Wed, 01 Jun 2011 05:44:25 +0200
parents 8248aae33f7d
children a415fe296a50
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/util/PathPool.java	Tue May 31 05:33:16 2011 +0200
+++ b/src/org/tmatesoft/hg/util/PathPool.java	Wed Jun 01 05:44:25 2011 +0200
@@ -41,6 +41,7 @@
 	}
 
 	// pipes path object through cache to reuse instance, if possible
+	// TODO unify with Pool<Path>
 	public Path path(Path p) {
 		String s = pathRewrite.rewrite(p.toString());
 		Path cached = get(s, false);
@@ -63,6 +64,11 @@
 		}
 		return get("", true);
 	}
+	
+	// invoke when path pool is no longer in use, to ease gc work
+	public void clear() {
+		cache.clear();
+	}
 
 	private Path get(String p, boolean create) {
 		SoftReference<Path> sr = cache.get(p);