Skip to content

Commit

Permalink
fix(config/plugins.h): memory leak caused by non-virtual destructor
Browse files Browse the repository at this point in the history
Closes #259
  • Loading branch information
lotem committed Mar 5, 2019
1 parent 7076d9e commit 316a659
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/rime/config/plugins.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ class ConfigCompilerPlugin {
typedef bool Review(ConfigCompiler* compiler,
an<ConfigResource> resource);

virtual ~ConfigCompilerPlugin() = default;

virtual Review ReviewCompileOutput = 0;
virtual Review ReviewLinkOutput = 0;
};
Expand Down Expand Up @@ -57,7 +59,7 @@ struct ResourceType;
class SaveOutputPlugin : public ConfigCompilerPlugin {
public:
SaveOutputPlugin(const ResourceType& output_resource);
~SaveOutputPlugin();
virtual ~SaveOutputPlugin();

Review ReviewCompileOutput;
Review ReviewLinkOutput;
Expand Down

0 comments on commit 316a659

Please sign in to comment.