Terry J. Reedy added the comment:
ConfigDialog is a good guess as I added a minimal test this month.
I will try to revise to not create loops in the first place.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22068
Serhiy Storchaka added the comment:
Here is a patch against 2.7 which get rid of reference loops in Tk variables
and Font. This will fix not only ConfigDialog, but any similar user code.
In 3.4+ such reference loops are successfully resolved, but I think we should
foreport this path to 3.4+
STINNER Victor added the comment:
I agree that the patch shoukd also br applied to 3.4.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22068
___
Terry J. Reedy added the comment:
F:\Python\dev2\py27\pcbuild\python_d.exe -m test.regrtest -R :: -uall test_idle
test_idle leaked [1945, 1945, 1945, 1945] references, sum=7780
There are none with 3.4, so the new gc is doing its job.
There are also none with test_configdialog renamed xtest... ,
New submission from Serhiy Storchaka:
$ ./python -m test.regrtest -ugui -v test_idle test_gc
...
==
FAIL: test_saveall (test.test_gc.GCTests)
--
Traceback (most
STINNER Victor added the comment:
It looks like test_idle leaks uncollectable objects.
I modified regrtest to use tracemalloc, I attach the output: tracemalloc.txt.
Good luck to find the leaks ;-)
--
nosy: +haypo
Added file: http://bugs.python.org/file36087/tracemalloc.txt
STINNER Victor added the comment:
regrtest_tracemalloc.patch: my patch for regrtest.py to dump the traceback
where garbage objects where allocated using tracemalloc.
http://pytracemalloc.readthedocs.org/
(Note: you need to recompile Python to use tracemalloc on Python 3.4.)
--
Serhiy Storchaka added the comment:
Indeed, there are a lot of small reference loops in ConfigDialog. Tk variables
save reference to the dialog and the dialog saves references to variables.
Either variables should be created with different argument (i.e. self.parent),
or they should be