I have a small working POC application running that instantiates a tracktion engine and an edit.
I also have a suite of unit tests that all use an engine and an edit instance. Since initialisation of the engine takes a little while for every test, the test suite runs rather slow.
To solve this I’m trying to reuse the same engine instance across all tests in the suite, just creating a fresh edit for each test case. Unfortunately, I’m seeing a bunch of leaked objects when edits go out of scope and I’m not sure how to fix it.
I’m guessing there must be a way to cleanly create and delete multiple edits with the same engine instance? If so, can anyone tell me how?
Are you sure you’re deleting the Edit correctly? What objects are leaking?
This is the same approach we use for our Unit Tests which you can see throughout the code base.
Thanks for the hint about calling from the message thread. Turns out the problem occurred because I was not keeping the juce MessageManager alive across tests.
If anyone is interested in using Tracktion Engine with Goggle Test, here is the solution I came up with: