[issue39061] Garbage Collection optimizations cause "memory leak"

2019-12-16 Thread Maxime Istasse
Maxime Istasse added the comment: > The fact that the GC will take longer time does not qualify this as memory > leaks. A memory leak is by definition memory that cannot be reclaimed and in > this case, once the collection of the old generation happens it will be > collected,

[issue39061] Garbage Collection optimizations cause "memory leak"

2019-12-16 Thread Maxime Istasse
Maxime Istasse added the comment: TLDR; a short-lived object can make it directly from young generation to old generation if middle generation collection kicks in while it is not freeable yet. Old generation is very rarely collected. Several of those objects, if they imply cyclic references

[issue39061] Garbage Collection optimizations cause "memory leak"

2019-12-16 Thread Maxime Istasse
New submission from Maxime Istasse : When working on a self-referencing object in the young generation and the middle-generation collection kicks in, that object is directly moved to the old generation. (if I understood this well: https://github.com/python/cpython/blob