Mercurial > scratch
diff pydershell/pydershell.py @ 15:351525e95a45
Added memory leak detection.
author | Atul Varma <varmaa@toolness.com> |
---|---|
date | Sun, 06 Sep 2009 14:59:58 -0700 |
parents | 9bcbf780581f |
children | a78570a423ea |
line wrap: on
line diff
--- a/pydershell/pydershell.py Sun Sep 06 14:55:22 2009 -0700 +++ b/pydershell/pydershell.py Sun Sep 06 14:59:58 2009 -0700 @@ -183,3 +183,8 @@ runtime = JSRuntime() runtime.run_script('test.js') del runtime + + import gc + gc.collect() + if pydermonkey.get_debug_info()['runtime_count']: + print "WARNING: JS runtime was not destroyed."