Resource cleanup on shutdown
Manuel reported that he suspect the Module destructors are not called. I know that the Command layer is under a revamp, so I didn't create merge request for a change, rather created this issue to keep this problem in mind.
Simply adding m_plugin.unload()
after stop_and_notify()
at line 150 in Command.cpp solves the issue, as it destroys the loaded plugin object.
We need a proper cleanup of every allocated resources and dynamically loaded objects, as SIGKILL on the process by supervisord doesn't call destructors, hence we can leak.