提交 020f36a7 authored 作者: Thomas Mueller's avatar Thomas Mueller

Release memory earlier

上级 aef28de9
...@@ -145,7 +145,7 @@ public class MVStore { ...@@ -145,7 +145,7 @@ public class MVStore {
* It is split in 16 segments. The stack move distance is 2% of the expected * It is split in 16 segments. The stack move distance is 2% of the expected
* number of entries. * number of entries.
*/ */
private final CacheLongKeyLIRS<Page> cache; private CacheLongKeyLIRS<Page> cache;
private int lastChunkId; private int lastChunkId;
...@@ -671,7 +671,7 @@ public class MVStore { ...@@ -671,7 +671,7 @@ public class MVStore {
} }
// release memory early - this is important when called // release memory early - this is important when called
// because of out of memory // because of out of memory
cache.clear(); cache = null;
for (MVMap<?, ?> m : New.arrayList(maps.values())) { for (MVMap<?, ?> m : New.arrayList(maps.values())) {
m.close(); m.close();
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论