From c65aeaf25f63de7aa95dffef7fe8ddb7434cc5a9 Mon Sep 17 00:00:00 2001 From: Phil Nash Date: Mon, 16 Jan 2017 10:30:44 +0000 Subject: [PATCH] Clean up generator state --- include/internal/catch_context_impl.hpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/internal/catch_context_impl.hpp b/include/internal/catch_context_impl.hpp index 030f29e2..8516ad93 100644 --- a/include/internal/catch_context_impl.hpp +++ b/include/internal/catch_context_impl.hpp @@ -12,6 +12,7 @@ #include "catch_context.h" #include "catch_stream.hpp" +#include "catch_common.h" namespace Catch { @@ -21,6 +22,11 @@ namespace Catch { Context( Context const& ); void operator=( Context const& ); + public: + virtual ~Context() { + deleteAllValues( m_generatorsByTestName ); + } + public: // IContext virtual IResultCapture* getResultCapture() { return m_resultCapture;