Comment 5 for bug 1282089

Revision history for this message
Florent Flament (florentflament) wrote :

Mmh, that's interesting.

If I understand well, Python should automatically release connections when there's no more references towards them, by calling del. But because of circular references, this mechanism doesn't work. So, in addition to having hanging connexions, we may be in presence of memory leaks.

Ideally, we may try to track and remove circular references if possible. In the mean time, we can override the __del__() method of the appropriate classes to help Python free unused connexions.

The close() method I proposed isn't that useful if we go towards using the __del__ mechanism to automatically have Python close unused connexions.