Looking at the cursor
docs for MongoDB, I don't see a way to delete a cursor. What happens in PyMongo if I am using a cursor with the no_cursor_timeout
property set to True? Is the cursor deleted when my script terminates even if I have not gotten to the end of the cursor's results?
Python uses reference counting for object lifetime management, when the Cursor object goes out of scope the garbage collector would call __die() which closes the cursor. If you want explicit control, you can call close() by yourself.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With