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

mongoc_init and mongoc_cleanup are never called

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.0.3
    • Component/s: None
    • Labels:
      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

              Assignee:
              jmikola Jeremy Mikola
              Reporter:
              matt.broadstone Matt Broadstone
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: