]> git.tdb.fi Git - libs/gl.git/commitdiff
Plug a memory leak in PipelineTemplate
authorMikko Rasa <tdb@tdb.fi>
Sat, 23 Jun 2018 00:57:40 +0000 (03:57 +0300)
committerMikko Rasa <tdb@tdb.fi>
Sat, 23 Jun 2018 00:57:40 +0000 (03:57 +0300)
source/pipelinetemplate.cpp
source/pipelinetemplate.h

index 4493e72c80b38e60c008547280f854629f76dabc..f9344d3e3f8e9912b8c9358f653bc9d9bab33b00 100644 (file)
@@ -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()
 { }
index 56c4da19a0e9efb6eb28b9b4519195a3d0779933..cdf73ac7c01c465764464863218e2ff5cc67db6b 100644 (file)
@@ -75,6 +75,7 @@ private:
 
 public:
        PipelineTemplate();
+       ~PipelineTemplate();
 
        bool get_hdr() const { return hdr; }
        unsigned get_required_multisample() const { return required_multisample; }