Commit eeabb498 authored by Chris Toshok's avatar Chris Toshok

assume the presence of gc.collect. gc.collect() every 80 iterations

parent f366715e
try:
import gc
have_gc = True
except e:
pass
import gc
def open_lots_of_files():
for x in range(0, 5000):
f = open("/dev/null")
if have_gc:
gc.collect();
for x in range(0, 10000):
f = open("/dev/null")
if x % 80 == 0:
gc.collect();
open_lots_of_files()
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment