[CDRIVER-3361] session_opts and transaction_opts clone method docs should discuss freeing the copy Created: 05/Sep/19  Updated: 28/Oct/23  Resolved: 08/Sep/21

Status: Closed
Project: C Driver
Component/s: docs, libmongoc
Affects Version/s: None
Fix Version/s: 1.20.0

Type: Improvement Priority: Minor - P4
Reporter: Jeremy Mikola Assignee: Ezra Chung
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

The documentation for mongoc_cursor_clone states that it returns a newly allocated struct that should be freed with a particular method (it links to mongoc_cursor_destroy. The docs for the session_opts and transaction_opts clone methods simply state that they create a copy of a struct in their "Synopsis" section. Those pages also don't have a "Returns" section as the cursor method does. I think they can be improved by 'd do well to link to the corresponding destroy method. Optionally, consider doing so in a "Returns" section for consistency.

Related pages:



 Comments   
Comment by Githook User [ 08/Sep/21 ]

Author:

{'name': 'Ezra Chung', 'email': '88335979+eramongodb@users.noreply.github.com', 'username': 'eramongodb'}

Message: CDRIVER-3361 update documentation for owning return values (#863)
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/2b2a37400857fbc1c9fbc639b906aca4c5a99e7f

Generated at Wed Feb 07 21:17:48 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.