how to detect memory is freed by GC in python code example
Example 1: python clear memory
a = 10
print a
del a
print a ## throws an error here because it's been deleted already.
Example 2: force garbage collection in python
import gc
gc.collect()
Example 3: python garbaze collection
import gc
gc.get_count()
gc.get_threshold()
gc.get_referrers(obj)