From cc37f73ba447e4e7b55e0531b36d5da6037c665b Mon Sep 17 00:00:00 2001 From: Baptiste Wicht Date: Wed, 29 Jan 2014 21:17:01 +0100 Subject: [PATCH] Empty the list when it gets destroyed --- kernel/include/stl/list.hpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/kernel/include/stl/list.hpp b/kernel/include/stl/list.hpp index 9288ab52..889b6275 100644 --- a/kernel/include/stl/list.hpp +++ b/kernel/include/stl/list.hpp @@ -33,6 +33,12 @@ public: //Nothing else to init } + ~list(){ + while(!empty()){ + pop_back(); + } + } + // Disable copy for now list(const list& rhs) = delete; list& operator=(const list& rhs) = delete;