Test is not COM-compatible?

SDK for VST 3 audio plug-in and host development.
Post Reply
Posts: 4
Joined: Wed Jun 22, 2016 7:41 am

Test is not COM-compatible?

Post by obiwanjacobi »

I am running into errors on dtor's of for instance the Parameter Change (validtor.exe) tests.

This code in `automation.cpp` (line 103)

Code: Select all

paramChanges = new ParamChanges[numParams];
and later (line 149)

Code: Select all

delete[] paramChanges;
is not correct.

You can never allocate 'COM' objects in an array like that - or destroy them that way.
You have to use the reference counting mechanism.

So allocation should be done on individual basis and destruction is a matter of calling `release()` (and clearing your member var to indicate that).

I am somewhat concerned that this code is in here after all this time. That either means not many people use these tests or they are doing it wrong...??

I also want to suggest to add a `DEBUG` implementation for `FUNKNOWN_DTOR` that asserts its __refcount.

Arne Scheffler
Posts: 375
Joined: Mon Jun 20, 2016 7:53 am

Re: Test is not COM-compatible?

Post by Arne Scheffler »

Thanks for the report.

Post Reply