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

Semantics of flag MONGO_CURSOR_MUST_FREE issue

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Done
    • Icon: Minor - P4 Minor - P4
    • 0.90.0
    • None
    • None
    • Fully Compatible

    Description

      Currently, the flag MONGO_CURSOR_MUST_FREE is set when using the function mongo_find and then inspected when calling mongo_cursor_destroy in order to decide if free the memory is needed or not.
      This creates the challenge that from the "outside", Delphi driver, is not possible to know the state of a cursor in order to decide if mongo_cursor_dispose needs to be called or not and forcing the DLL user to track down if a cursor was used or not invoking the mongo_find function.
      On way to resolve this issue is by adding a function to allow the programmer to inspect the current state of the flag, so in the DLL client code the developer can check before calling mongo_cursor_dispose.

      Attachments

        Activity

          People

            gjmurakami Gary Murakami
            k2xt Jose Sebastian Battig
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: