Python: Collect garbage
If you have a variable with a large memory footprint, you can force garbage collection
using the gc
Garbage Collector module:
big_variable = None
gc.collect() # Run a full garbage collection.
Via python.org.
If you have a variable with a large memory footprint, you can force garbage collection
using the gc
Garbage Collector module:
big_variable = None
gc.collect() # Run a full garbage collection.
Via python.org.
Leave a comment