-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
man: add message unref to sd_bus_call_method #32900
base: main
Are you sure you want to change the base?
Conversation
Important An -rc1 tag has been created and a release is being prepared, so please note that PRs introducing new features and APIs will be held back until the new version has been released. |
functions into a single function call. When <parameter>reply</parameter> message returned from this function | ||
is no longer needed, it should be unreferenced by calling | ||
<citerefentry><refentrytitle>sd_bus_message_unref</refentrytitle><manvolnum>3</manvolnum></citerefentry> | ||
on it.</para> |
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.
This should be mentioned in sd_bus_call(3).
not call <citerefentry><refentrytitle>sd_bus_message_unref</refentrytitle><manvolnum>3</manvolnum></citerefentry> | ||
on it. If the callback wants to hold on to the message beyond the lifetime of the callback, it needs to call | ||
<citerefentry><refentrytitle>sd_bus_message_ref</refentrytitle><manvolnum>3</manvolnum></citerefentry> to create a | ||
new reference.</para> |
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.
Hm, this is copied from sd_bus_call(3). I do not think we should duplicate such...
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.
actually it's an important point, so either the same wording or a reference to the exact paragraph is a good thing to have here too, better to have too much info than too little
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.
Then, let's extract this to another .xml file and include it for all sd_bus_*_async() functions.
Hello,
I added information when to use and when not to use
sd_bus_message_unref
tosd_bus_call_method(3)
.