Task 2
This commit is contained in:
parent
56f40f57ae
commit
480a7eb5f5
|
@ -129,8 +129,8 @@ public class Storage {
|
|||
private static void sweep(List<Collectable> heap) {
|
||||
heap.removeIf(obj -> !obj.isMarked());
|
||||
heap.forEach(obj -> obj.setMark(false));
|
||||
//oldHeap.addAll(youngHeap);
|
||||
//youngHeap.clear();
|
||||
oldHeap.addAll(youngHeap);
|
||||
youngHeap.clear();
|
||||
}
|
||||
|
||||
public static void gc() {
|
||||
|
|
Loading…
Reference in New Issue