On Sat, Jul 23, 2016 at 03:25:33PM +0200, Christoph Zwerschke wrote:
> Am 23.07.2016 um 14:24 schrieb Christoph Zwerschke:
> >The problem is that we need to clean up using a destructor in that case.
> >However, since there are circular references, destructors do not work.
> >So we need to make some changes, like using weak references. I'll
> >experiment with that idea later today.
>
> Ok, this is fixed already in r880. Was a bit tricky since the underlying
> connection is a C object and weakrefs only work with Python objects.
>
> Please check and let me know if you have still any memory issues.
Confirmed this is resolved (or at least very much improved), thanks.
[pryzbyj@dev-justin pygres]$ python2.6 ~/rusage.py
8352 9148 rel rss= 0.09530651341
8352 13972 rel rss2= 0.672892720307
Traceback (most recent call last):
File "/home/pryzbyj/rusage.py", line 31, in <module>
assert rel<0.1, 'memory leak2'
AssertionError: memory leak2
[pryzbyj@dev-justin pygres]$ PYTHONPATH=./build/lib.linux-x86_64-2.6 python2.6
~/rusage.py
8432 8500 rel rss= 0.00806451612903
8432 8656 rel rss2= 0.0265654648956
Justin
_______________________________________________
PyGreSQL mailing list
[email protected]
https://mail.vex.net/mailman/listinfo.cgi/pygresql