I read that you can manually collect garbage using
gc.collect()
Now I wonder when this is useful. I believe this is to some extent a common Python logic. Say I have a large cycle, and in each cycle large matrices will be used Zand rewritten them again and again. Is it useful to remove matrices and collect garbage at the end if I don't resize Z?
The general question . Under what circumstances can one actually observe the effects of forced garbage collection, especially with a large number of numerical calculations within numpy?
source
share