Fix module registry memory leak. #8282
This leak is caused by this line:
This code is now a map and easy to clear but until very recently it was a normal
Circus CI no longer fails with an OOM error, which means this has definitely made an impact.
Just need a sanity check on the behavior change and if it makes sense. In the case where we want to preserve the old behavior (I still think it's a bug), it can be done in a way that doesn't create a large memory leak.
@cpojer take a look if you have a moment, maybe you can confirm it's a bug for me?
@@ Coverage Diff @@ ## master #8282 +/- ## ======================================= Coverage 62.13% 62.13% ======================================= Files 266 266 Lines 10664 10664 Branches 2590 2590 ======================================= Hits 6626 6626 Misses 3448 3448 Partials 590 590
I agree. Hopefully nobody (unwittingly) relied on getting old versions of modules after a reset