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

Clarify lifetime of mongoc_client_session_get_opts return value

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Minor - P4 Minor - P4
    • 1.20.0
    • None
    • docs, libmongoc
    • None

    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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: