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

Semantics of flag MONGO_CURSOR_MUST_FREE issue

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 0.90.0
    • Affects Version/s: None
    • Component/s: None
    • Fully Compatible

      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.

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

              Created:
              Updated:
              Resolved: