From 480a7eb5f5973dfbc7286bdc90471c4a127cc423 Mon Sep 17 00:00:00 2001 From: schrom01 Date: Mon, 19 Dec 2022 22:26:24 +0100 Subject: [PATCH] Task 2 --- src/ch/zhaw/ads/Storage.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ch/zhaw/ads/Storage.java b/src/ch/zhaw/ads/Storage.java index 4e1fd17..30b71f0 100644 --- a/src/ch/zhaw/ads/Storage.java +++ b/src/ch/zhaw/ads/Storage.java @@ -129,8 +129,8 @@ public class Storage { private static void sweep(List 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() {