Commits

Matthew Turk committed 6c33026

Adding garbage collection info

Comments (0)

Files changed (1)

 from yt.utilities.amr_utils import QuadTree
 import h5py
 import time
+import gc
 from contextlib import contextmanager
 
 from mpi4py import MPI
             f["/"].attrs["%s_max" % exn] = ma
         f.close()
     if root: print "YTINLINE: Concluded. (%0.3e)" % (time.time() - t1)
+    for g in pf.h.grids: g.clear_data()
+    del pf
+    nobj = gc.collect()
+    print "YTINLINE: Collected %s objects" % (nobj)
 
 def add_grid_to_tree(tree, g, fields, weight, dx, axis):
     if weight is None: