From 0caa6abd5b0f86b9f44c09695cc36df097894bdc Mon Sep 17 00:00:00 2001 From: HolyWu Date: Mon, 25 May 2015 00:06:16 +0800 Subject: [PATCH] Fix memory leaks in VAggregate --- include/VAggregate.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/include/VAggregate.h b/include/VAggregate.h index aa156f8..61426ca 100644 --- a/include/VAggregate.h +++ b/include/VAggregate.h @@ -124,6 +124,17 @@ class VAggregate_Process } } + virtual ~VAggregate_Process() override + { + for (int i = 0; i < frames; ++i) + { + if (i != cur) + { + vsapi->freeFrame(v_src[i]); + } + } + } + // Always output 16bit int or 32bit float Gray/YUV static const VSFormat *NewFormat(const _Mydata &d, const VSFormat *f, VSCore *core, const VSAPI *vsapi) {