<filename>Item81/using_gc.py
#!/usr/bin/env PYTHONHASHSEED=1234 python3

import gc

found_objects = gc.get_objects()
print('Before:', len(found_objects))

import waste_memory

hold_reference = waste_memory.run()

found_objects = gc.get_objects()
print('After: ', len(found_objects))
for obj in found_objects[:3]:
    print(repr(obj)[:100])

print('...')
<filename>Item81/using_gc.py
#!/usr/bin/env PYTHONHASHSEED=1234 python3

import gc

found_objects = gc.get_objects()
print('Before:', len(found_objects))

import waste_memory

hold_reference = waste_memory.run()

found_objects = gc.get_objects()
print('After: ', len(found_objects))
for obj in found_objects[:3]:
    print(repr(obj)[:100])

print('...')
#!/usr/bin/env PYTHONHASHSEED=1234 python3