diff --git a/src/List.java b/src/List.java index 12392f4..413d20f 100644 --- a/src/List.java +++ b/src/List.java @@ -74,7 +74,6 @@ returnValue = -1; } - return returnValue; } @@ -89,7 +88,11 @@ } public void clear() { - + while (root != null) { + Node temp = root.next; + root = null; + root = temp; + } } public void append(IList aList) {