From 5f4ed7a789dbe338a1113d5498f3038f42b6dfd6 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Thu, 29 Dec 2022 18:44:30 +0200 Subject: [SDP/P] Fixed memory leaks --- Year 2/Structures and data algorithms/Project/exc/main.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Year 2/Structures and data algorithms/Project/exc/main.cpp') 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; } -- cgit v1.3.1-23-gd82d