Update comments on get_plugin_factory()

Now that we do use a smart pointer to manage it ourselves, as proven
necessary by REAPER.
This commit is contained in:
Robbert van der Helm
2021-01-21 02:05:21 +01:00
parent 74dc8225d1
commit 6f5a8e3ebf
2 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -369,8 +369,8 @@ Steinberg::IPluginFactory* Vst3PluginBridge::get_plugin_factory() {
new YaPluginFactoryImpl(*this, std::move(factory_args)));
}
// Because we're returning a raw pointer, we have to increas the
// reference count ourselves
// Because we're returning a raw pointer, we have to increase the reference
// count ourselves
plugin_factory->addRef();
return plugin_factory;
+3 -3
View File
@@ -63,9 +63,9 @@ class Vst3PluginBridge : PluginBridge<Vst3Sockets<std::jthread>> {
/**
* When the host loads the module it will call `GetPluginFactory()` which
* will in turn call this function. The idea is that we return an
* `IPluginFactory*` while doing all the reference counting that `IPtr<T>`
* would normally do for us ourselves. This means that when the host frees
* its last instance of this factory, `plugin_factory` will also be cleared.
* `IPluginFactory*` that acts as an owned `IPtr<IPluginFactory>`, so we
* have to manually increase the reference count here for every plugin
* factory instance we return.
*
* @see plugin_factory
*/