[issue26190] GC memory leak using weak and cyclic references

2016-01-24 Thread Maximilian Köhl

New submission from Maximilian Köhl:

In the attached code the object initially bind to `a` is never garbage 
collected although there are no references left. The finalizer of `b` is 
executed and the weak reference to it becomes dead however the garbage 
collector does not free the object itself and it could be resurrected with 
`gc.get_objects()`.

Output:
gc: collecting generation 2...
gc: objects in each generation: 27 0 5795
gc: collectable 
gc: collectable 
finalize: b <__main__.A object at 0x7f158796acc0>
gc: done, 3 unreachable, 0 uncollectable, 0.0005s elapsed
gc: collecting generation 2...
gc: objects in each generation: 1 0 5812
gc: done, 0.0005s elapsed
gc: collecting generation 2...
gc: objects in each generation: 1 0 5812
gc: done, 0.0005s elapsed
[...]

--
components: Interpreter Core
files: gc_test_code.py
messages: 258886
nosy: koehlma
priority: normal
severity: normal
status: open
title: GC memory leak using weak and cyclic references
type: resource usage
versions: Python 3.5
Added file: http://bugs.python.org/file41704/gc_test_code.py

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue26190>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26190] GC memory leak using weak and cyclic references

2016-01-24 Thread Maximilian Köhl

Changes by Maximilian Köhl <m...@koehlma.de>:


--
resolution:  -> not a bug
status: open -> closed

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue26190>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com