mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-07 12:10:09 +02:00
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:
@@ -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;
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user