Skip to content

Commit 316a659

Browse files
committed
fix(config/plugins.h): memory leak caused by non-virtual destructor
Closes #259
1 parent 7076d9e commit 316a659

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/rime/config/plugins.h

+3-1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ class ConfigCompilerPlugin {
1717
typedef bool Review(ConfigCompiler* compiler,
1818
an<ConfigResource> resource);
1919

20+
virtual ~ConfigCompilerPlugin() = default;
21+
2022
virtual Review ReviewCompileOutput = 0;
2123
virtual Review ReviewLinkOutput = 0;
2224
};
@@ -57,7 +59,7 @@ struct ResourceType;
5759
class SaveOutputPlugin : public ConfigCompilerPlugin {
5860
public:
5961
SaveOutputPlugin(const ResourceType& output_resource);
60-
~SaveOutputPlugin();
62+
virtual ~SaveOutputPlugin();
6163

6264
Review ReviewCompileOutput;
6365
Review ReviewLinkOutput;

0 commit comments

Comments
 (0)