(core): document service's output management in OSR section
Description
Generating outputs in a service can induce some issues (about object lifetime) if it is not properly managed. There is no documentation about setOuput
method in SAD/OSR section.
Proposal
Add documentation about setOutput
: explain the issues about the management of the object life
If the service generates a new object, it must manage its life time (the AppConfig nor the OSR will keep a reference on this object). When the service is stopped, it must inform the AppConfig that the object is no longer maintained. It is done with a setOutput("<key>", nullptr)
in the stopping
method.
Edited by Emilie WERNERT