added missing cleanup statements for short memory cases during search

pull/1/head
Michael Peter Christen 12 years ago
parent 2562f052b9
commit 587ef83eab

@ -606,6 +606,9 @@ public final class SearchEvent {
if (this.IACount != null) this.IACount.clear();
if (this.IAResults != null) this.IAResults.clear();
if (this.heuristics != null) this.heuristics.clear();
this.rwiStack.clear();
this.nodeStack.clear();
this.resultList.clear();
}
public String abstractsString(final byte[] hash) {

@ -116,6 +116,7 @@ public class SearchEventCache {
final int burstRobinsonPercent,
final int burstMultiwordPercent) {
if (MemoryControl.shortStatus()) cleanupEvents(true);
final String id = query.id(false);
SearchEvent event = getEvent(id);
if (Switchboard.getSwitchboard() != null && !Switchboard.getSwitchboard().crawlQueues.noticeURL.isEmpty() && event != null && System.currentTimeMillis() - event.getEventTime() > 60000) {

Loading…
Cancel
Save