From: Mikko Rasa Date: Sat, 23 Jun 2018 00:57:40 +0000 (+0300) Subject: Plug a memory leak in PipelineTemplate X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=59489e302517943f637bffea953671abc4e43cb6;p=libs%2Fgl.git Plug a memory leak in PipelineTemplate --- 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; }