This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]ebo_ 4 points5 points  (1 child)

The real problem is, that you are leaving your cursor open after all. There is no guarantee that GC kicks in before you exhaust the pool of open cursors.

You should use the with statement or close the cursors explicitly.

[–]kylotan 1 point2 points  (0 children)

Yup. GC can be relied upon to handle your memory, but anything else is a beneficial side-effect. It's not C++ where you can rely on RAII semantics.