PrincetonUniversity / PsyNeuLink

A block modeling system for cognitive neuroscience
https://psyneulink.org
Apache License 2.0
86 stars 31 forks source link

Running composition tests leaks memory #2475

Open jvesely opened 2 years ago

jvesely commented 2 years ago

PR #2474 adds a simple leak detection on compiled tests; the code generator maintains a cache for every compiled PNL component. This cache uses WeakKeyDictionary so when the components get GC-ed it will remove the associated compiler data.

The check asserts that the WeakKeyDictionary is empty after running GC.

384 tests currently fail the assertion [0];

[0] https://github.com/PrincetonUniversity/PsyNeuLink/runs/7953304797?check_suite_focus=true

jvesely commented 1 month ago

A leak check and a specialized leak test were added in #2992. The leak test was extended to more operations in #2997