mirror of
https://github.com/MarginaliaSearch/MarginaliaSearch.git
synced 2025-10-05 21:22:39 +02:00
(index) Safeguard against arena-leaks during exceptions
The GC would catch these eventually, but it's nice to clean up ourselves in a timely manner.
This commit is contained in:
@@ -96,7 +96,7 @@ public class IndexResultRankingService {
|
||||
this.termsForDocs = currentIndex.getTermMetadata(arena, budget, searchTerms.termIdsAll.array, resultIds);
|
||||
this.documentSpans = currentIndex.getDocumentSpans(arena, budget, resultIds);
|
||||
}
|
||||
catch (TimeoutException ex) {
|
||||
catch (TimeoutException|RuntimeException ex) {
|
||||
arena.close();
|
||||
throw ex;
|
||||
}
|
||||
|
Reference in New Issue
Block a user