-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clearly document lifetime expectations for CommandSender. #7067
Clearly document lifetime expectations for CommandSender. #7067
Conversation
@@ -100,7 +100,7 @@ class InteractionModelEngine : public Messaging::ExchangeDelegate | |||
|
|||
/** | |||
* Retrieve a CommandSender that the SDK consumer can use to send a set of commands. If the call succeeds, | |||
* the consumer is responsible for calling Shutdown() on the CommandSender once it's done using it. | |||
* see CommandSender documentation for lifetime handling. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: redirecting from a doc to another doc is generally somewhat inconvenient for reads of code. Don't have a better suggestion though beside some more invasive changes that would not require documentation to figure out lifetime (smart-pointer/handle usage).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I was not too happy about this either, not least because it's not pointing directly at the relevant docs over there, but if I did that I'd be pointing to a function name that can also change... I couldn't find a nicer solution just with documentation, unfortunately. :(
Problem
Documentation for CommandSender lifetime does not match reality.
Change overview
Fix the documentation
Testing
Comment-only change, no functional changes.