Hi,
I am new to using Audio Weaver. My task is to write a module in C code in which I involve a third party library.
I have understood how the concept of variable definitions etc is meant to be and I have identified the constructor to start the third party library to receive and store an opaque pointer.
And here is my question: how can I add the destructor in which I may release the memory related to the third party library?
Thank you and best regards
Hauke
6:07pm
Hi Hauke,
If an instance of your module is used in an Audio Weaver layout, then it will use the required amount of memory (including memory related to the 3rd-party library) on the available heap as specified by your constructor. During run-time, that memory needs to remain allocated and cannot be freed. Freeing memory occurs when terminating the Audio Weaver process and is handled by the framework. So no need to write a destructor function for your module.
Thanks,
Michael