From 59489e302517943f637bffea953671abc4e43cb6 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Sat, 23 Jun 2018 03:57:40 +0300 Subject: [PATCH] Plug a memory leak in PipelineTemplate --- source/pipelinetemplate.cpp | 6 ++++++ source/pipelinetemplate.h | 1 + 2 files changed, 7 insertions(+) diff --git a/source/pipelinetemplate.cpp b/source/pipelinetemplate.cpp index 4493e72c..f9344d3e 100644 --- a/source/pipelinetemplate.cpp +++ b/source/pipelinetemplate.cpp @@ -19,6 +19,12 @@ PipelineTemplate::PipelineTemplate(): max_multisample(0) { } +PipelineTemplate::~PipelineTemplate() +{ + for(PostProcessorArray::iterator i=postprocessors.begin(); i!=postprocessors.end(); ++i) + delete *i; +} + PipelineTemplate::Pass::~Pass() { } diff --git a/source/pipelinetemplate.h b/source/pipelinetemplate.h index 56c4da19..cdf73ac7 100644 --- a/source/pipelinetemplate.h +++ b/source/pipelinetemplate.h @@ -75,6 +75,7 @@ private: public: PipelineTemplate(); + ~PipelineTemplate(); bool get_hdr() const { return hdr; } unsigned get_required_multisample() const { return required_multisample; } -- 2.45.2