Do I have to, and how can I, free memory from a class created in a Windows Runtime Component that has been returned to a managed C# project?
This question concerns Classes instead of structs like How to free memory of c++ WinRT value structs
The following scenario occurs
- C++\Runtime component Method is raised from C# project
- C++ class is created (a single class with a collection of other c++ classes)
- C++ class is returned
- C# project works with the data
I want to be sure the following classes wont create memory leaks: https://github.com/cmusphinx/pocketsphinx-wp-demo/blob/master/PocketSphinxRntComp/SpeechRecognizer.h#L32
I'm (still) new with freeing memory and haven't got a clue how and when to free this. Anyone?