BaseTools/VfrCompile/Pccts: Add virtual destructor for class DLGInputStream
Class DLGInputStream defined in DLexerBase.h has a virtual method but no virtual destructor. This commit add an empty virtual destructor to avoid potential memory/resource leak when an object of a class derived from class DLGInputStream is deleted through a pointer to the DLGInputStream class. Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Cc: Eric Dong <eric.dong@intel.com> Cc: Dandan Bi <dandan.bi@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
@@ -57,6 +57,7 @@ public:
|
|||||||
class DllExportPCCTS DLGInputStream {
|
class DllExportPCCTS DLGInputStream {
|
||||||
public:
|
public:
|
||||||
virtual int nextChar() = 0;
|
virtual int nextChar() = 0;
|
||||||
|
virtual ~DLGInputStream() {};
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Predefined char stream: Input from FILE */
|
/* Predefined char stream: Input from FILE */
|
||||||
|
Reference in New Issue
Block a user