Summary Files Commits Branches @commit @diff @stats
path: root / Year 2 / Structures and data algorithms / Project / exc / main.cpp
diff options
context:
space:
mode:
1 files changed, 4 insertions, 0 deletions
-rw-r--r--Year 2/Structures and data algorithms/Project/exc/main.cpp4
diff --git a/Year 2/Structures and data algorithms/Project/exc/main.cpp b/Year 2/Structures and data algorithms/Project/exc/main.cpp
index 95636ce..d482b7e 100644
--- a/Year 2/Structures and data algorithms/Project/exc/main.cpp
+++ b/Year 2/Structures and data algorithms/Project/exc/main.cpp
@@ -69,4 +69,8 @@ int main() {
cb->removeUselessSubBoxes();
cb->print(std::cout) << std::endl;
}
+
+ // Free memory
+ for (Box* b : boxes)
+ delete b;
}