From e363d023cdae4ebcd7ee5b0f46c2c12d8deaff94 Mon Sep 17 00:00:00 2001 From: Eric Teunis de Boone Date: Fri, 10 Jan 2020 16:21:10 +0100 Subject: [PATCH] Missed delete in ex7.4 Stack --- ex7.4/Stack.hh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ex7.4/Stack.hh b/ex7.4/Stack.hh index d6e1659..e4f3fa1 100644 --- a/ex7.4/Stack.hh +++ b/ex7.4/Stack.hh @@ -11,6 +11,9 @@ class Stack { Stack() { _s = new std::deque(); } + ~Stack() { + delete _s; + } int nitems() { return _s->size() ; } bool empty() { return (_s->size() == 0) ; }