Running the test_meshfill_draw_mesh.py test leaks about 10,900 objects. This is very significant, as it means that rendering multiple large datasets, even properly scoped so no vcs objects are reachable, will quickly exhaust the available system memory. This is also causing issues interfacing with other modules that need objects to be freed before the interpreter shuts down.
This is easy to test for manually:
Take any existing test, and put the entire file, imports and all, into a def runTest(): block.
Change any sys.exit(x) calls into return x.
Add the following to the bottom of the script:
import gc
gc.enable()
gc.set_debug(gc.DEBUG_LEAK)
result = runTest()
gc.collect()
for i,g in enumerate(gc.garbage):
print "Leak %d: %s @0x%x:\n %s"%(i, type(g), id(g), str(g)[:70])
import sys
sys.exit(result)
Running the
test_meshfill_draw_mesh.py
test leaks about 10,900 objects. This is very significant, as it means that rendering multiple large datasets, even properly scoped so no vcs objects are reachable, will quickly exhaust the available system memory. This is also causing issues interfacing with other modules that need objects to be freed before the interpreter shuts down.This is easy to test for manually:
import
s and all, into adef runTest():
block.sys.exit(x)
calls intoreturn x
.The results of
test_meshfill_draw_mesh.py
are here: https://gist.github.com/dlonie/2d72d0cfa4a52271bb7aMigrated from: https://github.com/UV-CDAT/uvcdat/issues/1343