1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-01-19 23:36:08 +01:00

Simplify memory management in PluginManager

This commit is contained in:
Paul Licameli
2021-06-18 13:08:36 -04:00
parent 4770b1f0a4
commit 8fda526577
24 changed files with 96 additions and 192 deletions

View File

@@ -43,6 +43,7 @@
#define __AUDACITY_MODULEINTERFACE_H__
#include <functional>
#include <memory>
#include "Identifier.h"
#include "audacity/ComponentInterface.h"
#include "audacity/PluginInterface.h"
@@ -129,10 +130,8 @@ public:
virtual bool IsPluginValid(const PluginPath & path, bool bFast) = 0;
// When appropriate, CreateInstance() will be called to instantiate the plugin.
virtual ComponentInterface *CreateInstance(const PluginPath & path) = 0;
// When appropriate, DeleteInstance() will be called to delete the plugin.
virtual void DeleteInstance(ComponentInterface *instance) = 0;
virtual std::unique_ptr<ComponentInterface>
CreateInstance(const PluginPath & path) = 0;
};
// ----------------------------------------------------------------------------