Uploaded image for project: 'Swift Driver'
  1. Swift Driver
  2. SWIFT-72

mongoc_init and mongoc_cleanup are never called

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 0.0.3
    • None
    • None

    Description

      We are presently not ever calling these functions, which the documentation for mongoc explicit states as a requirement.

      The CXX driver requires the user to initialize a `mongocxx::instance` at the start of a program, which calls `libmongoc::init()`; the destructor for a  `mongocxx::instance` then calls `libmongoc::cleanup()`. 

      We should implement this similarly, and maybe reference-count the mongoc instance in `MongoClient.deinit` to determine whether any other clients exist that point to it, and if not call cleanup. 

      Attachments

        Issue Links

          Activity

            People

              jmikola@mongodb.com Jeremy Mikola
              matt.broadstone@mongodb.com Matt Broadstone
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: