[issue41389] Garbage Collector Ignoring Some (Not All) Circular References of Identical Type

2020-07-27 Thread Ian O'Shaughnessy
Ian O'Shaughnessy added the comment: >I don't know of any language that guarantees all garbage will be collected >"right away". Do you? I'm not an expert in this domain, so, no. I am however attempting to find a way to mitigate this issue. Do you have any suggestions

[issue41389] Garbage Collector Ignoring Some (Not All) Circular References of Identical Type

2020-07-27 Thread Ian O'Shaughnessy
Ian O'Shaughnessy added the comment: "Leak" was likely the wrong word. It does appear problematic though. The loop is using a fixed number of variables (yes, there are repeated dynamic allocations, but they fall out of scope with each iteration), only one of these variables oc

[issue41389] Garbage Collector Ignoring Some (Not All) Circular References of Identical Type

2020-07-24 Thread Ian O'Shaughnessy
Ian O'Shaughnessy added the comment: For a long running process (greatly exceeding a million iterations) the uncollected garbage will become too large for the system (many gigabytes). A manual execution of the gc would be required. That seems flawed given that Python is a garbage collected

[issue41389] Garbage Collector Ignoring Some (Not All) Circular References of Identical Type

2020-07-24 Thread Ian O'Shaughnessy
New submission from Ian O'Shaughnessy : Using a script that has two classes A and B which contain a circular reference variable, it is possible to cause a memory leak that is not captured by default gc collection. Only by running gc.collect() manually do the circular references get collected