[CDRIVER-3362] Clarify lifetime of mongoc_client_session_get_opts return value Created: 05/Sep/19 Updated: 28/Oct/23 Resolved: 10/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 |
|
Documentation formongoc_client_session_get_opts should clarify that the returned pointer is only valid for the lifetime of the client session. Additionally, we can advise users about mongoc_session_opts_clone() and mongoc_session_opts_destroy() if they would like a permanent copy not bound to the lifetime of the session object. I know this is done in a few places for other get methods in libmongoc, but I'm not sure if this instance was intentional or simply an oversight. |
| Comments |
| Comment by Githook User [ 10/Sep/21 ] |
|
Author: {'name': 'Ezra Chung', 'email': '88335979+eramongodb@users.noreply.github.com', 'username': 'eramongodb'}Message: |