Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-3362

Clarify lifetime of mongoc_client_session_get_opts return value

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 Minor - P4
    • 1.20.0
    • Affects Version/s: None
    • Component/s: Docs, libmongoc
    • None

      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.

            Assignee:
            ezra.chung@mongodb.com Ezra Chung
            Reporter:
            jmikola@mongodb.com Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: