init() deinit() and memory release issue

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
Report Content as Inappropriate

init() deinit() and memory release issue


I have an issue for which I cannot find any solution at this time.
The idea is that I want to start from the main class a new thread running a class that contains gstreamer code. This class contains the init() statement, and in the end, if I call deinit(), new threads will not run properly afterwards. I read here on forum that deinit() doesn't completely cancel the previous initialization, they are not symmetrical calls. Otherwise, if I don't call deinit(), I can start new threads and these will run, but the memory will not be released at the end of the execution, so after starting multiple threads, the memory will be full.

All I want is to have a main class that runs continuously on a server. From this I can start new threads in which to run gstreamer code. At the end of the thread execution I want to release the memory occupied by the gstreamer elements.
Could you recommend a solution in this situation?

Thank you!