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

Improve mongoc_init and mongoc_cleanup docs

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • 1.6.0
    • 1.3.3
    • docs, libmongoc
    • None

    Description

      Update: to close this ticket, ensure that it's documented that mongoc_cleanup should be called once, and no other C Driver functions, not even mongoc_init, can be called after. Also, add links between mongoc_init, mongoc_cleanup, and the index page. Right now mongoc_cleanup is isolated.

      After a long debugging tour I learned
      that calling mongoc_init() and mongoc_cleanup() multiple times is bad practice
      which might result in segmentation faults.

      I suggest hereby adding

      assert(once==MONGOC_ONCE_INIT)

      to the implemetnations of these two functions,
      for indicating that there might be a problem.

      Regards
      Andre

      Attachments

        Activity

          People

            jesse@mongodb.com A. Jesse Jiryu Davis
            andre.maute andre maute
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: