[CDRIVER-144] Semantics of flag MONGO_CURSOR_MUST_FREE issue Created: 28/May/12  Updated: 05/Dec/13  Resolved: 12/Nov/13

Status: Closed
Project: C Driver
Component/s: None
Affects Version/s: None
Fix Version/s: 0.90.0

Type: Improvement Priority: Minor - P4
Reporter: Jose Sebastian Battig Assignee: Gary Murakami
Resolution: Done Votes: 0
Labels: driver, query
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: 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.


Generated at Wed Feb 07 21:08:35 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.