From b8cee9b7d8444db750e63d6ed470e17d93b01936 Mon Sep 17 00:00:00 2001 From: sixcooler Date: Fri, 2 May 2014 22:55:47 +0200 Subject: [PATCH] remove tables from tabletracker on close to avoid lots of dead entrys in /PerformanceMemory_p.html --- source/net/yacy/kelondro/table/Table.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/source/net/yacy/kelondro/table/Table.java b/source/net/yacy/kelondro/table/Table.java index 8630f35d2..2b652ad87 100644 --- a/source/net/yacy/kelondro/table/Table.java +++ b/source/net/yacy/kelondro/table/Table.java @@ -474,12 +474,17 @@ public class Table implements Index, Iterable { @Override public void close() { - if (this.file != null) this.file.close(); + String tablefile = null; + if (this.file != null) { + tablefile = this.file.filename().toString(); + this.file.close(); + } this.file = null; if (this.table != null) this.table.close(); this.table = null; if (this.index != null) this.index.close(); this.index = null; + if (tablefile != null) tableTracker.remove(tablefile); } @Override