~lifeless/meliae/stuff

« back to all changes in this revision

Viewing changes to meliae/scanner.py

  • Committer: Robert Collins
  • Date: 2009-09-13 21:02:43 UTC
  • Revision ID: robertc@robertcollins.net-20090913210243-acer02s2kw68qfle
Add some flush calls to reduce things being left in memory.

Show diffs side-by-side

added added

removed removed

Lines of Context:
46
46
        for ref in get_referents(next):
47
47
            if id(ref) not in seen:
48
48
                pending.append(ref)
 
49
    outf.flush()
49
50
 
50
51
 
51
52
def dump_gc_objects(outf, recurse_depth=1):
84
85
    for obj in all_objs:
85
86
        _scanner.dump_object_info(outf, obj, nodump=nodump,
86
87
                                  recurse_depth=recurse_depth)
 
88
    outf.flush()
87
89
 
88
90
 
89
91
def get_recursive_size(obj):