From 5861d416eaff148bbc7d35481b921ea79eb6fed7 Mon Sep 17 00:00:00 2001 From: Svyatoslav Date: Thu, 15 Jun 2017 11:20:10 +0300 Subject: [PATCH] Fix a memory leak functionParser.h: add virtual destructor into abstract class. A memory leak has been found by using PVS-Studio analyzer. Analyzer warning: V599 The virtual destructor is not present, although the 'FunctionParser' class contains virtual functions. Closes #3402 --- PowerEditor/src/WinControls/FunctionList/functionParser.h | 1 + 1 file changed, 1 insertion(+) diff --git a/PowerEditor/src/WinControls/FunctionList/functionParser.h b/PowerEditor/src/WinControls/FunctionList/functionParser.h index bf91afc97..7f491060e 100644 --- a/PowerEditor/src/WinControls/FunctionList/functionParser.h +++ b/PowerEditor/src/WinControls/FunctionList/functionParser.h @@ -49,6 +49,7 @@ public: virtual void parse(std::vector & foundInfos, size_t begin, size_t end, ScintillaEditView **ppEditView, generic_string classStructName = TEXT("")) = 0; void funcParse(std::vector & foundInfos, size_t begin, size_t end, ScintillaEditView **ppEditView, generic_string classStructName = TEXT(""), const std::vector< std::pair > * commentZones = NULL); bool isInZones(int pos2Test, const std::vector< std::pair > & zones); + virtual ~FunctionParser() {}; protected: generic_string _id; generic_string _displayName;