mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-08 20:40:11 +02:00
Don't use STL smart pointers with VST3 interfaces
This would cause double frees since those objects are supposed to clean up after themselves.
This commit is contained in:
@@ -62,4 +62,7 @@ TODO: Explain how we implement `createInstance()`
|
||||
- Since everything behind the scenes makes use of these `addRef()` and
|
||||
`release()` reference counting functions, we can't use the standard library's
|
||||
smart pointers when dealing with objects that are shared with the host or with
|
||||
the Windows VST3 plugin.
|
||||
the Windows VST3 plugin. In `IPtr<T>`'s destructor it will call release, and
|
||||
the objects will clean themselfs up with a `delete this;` when the reference
|
||||
count reaches 0. Combining this with the STL cmart pointers this would result
|
||||
in a double free.
|
||||
|
||||
Reference in New Issue
Block a user