At the top of most of our modulestores, there are cycles created that end up putting a lot of memory pressure on the garbage collector whenever working with large courses or many students (such as during grading). If we break those cycles with WeakReferences, then we should be able to free memory when grading is finished, without relying on a garbage collection cycle.
A test decorator that measures cycles that haven't been garbage collected
A decorated test that shows that the cycles exist in the current code
A change to remove the cycles, with changes to test results to verify.