Memory leak in re.optimize_kl
I recently tried to do some batch reconstructions again, and apparently there is still a memory leak in re.optimize_kl
when running multiple reconstructions in a loop. I have attached a modified version of the demo 0_intro.py
that shows the problem. The leak in this example amounts to ca. 233 MiB per iteration, even though the dof * samples * 8 (float64) = 613 KiB.
Edit: it actually is "only" 133 MiB, see below