diff options
author | Jasper St. Pierre <jstpierre@mecheye.net> | 2012-06-24 02:25:38 -0400 |
---|---|---|
committer | Jasper St. Pierre <jstpierre@mecheye.net> | 2012-06-24 19:20:48 -0400 |
commit | 3ce9ad05b3acab26bc5afb46b8d3c44ac1414412 (patch) | |
tree | 0ebe1202527011120add8b178f576256cf2391ee /src/run-js-test.c | |
parent | ab75faac74e40fdd96d51f67ab874e26e12a4fce (diff) |
run-js-test: GC twice after running a test
When running with Valgrind, this helps us ensure that we're managing
memory correctly. We need to GC twice as finalizing an object in the
sweep can unroot objects which were already marked. Technically, it
could be that we'll need to GC more than twice, but GCing twice should
hopefully last us for now.
https://bugzilla.gnome.org/show_bug.cgi?id=678737
Diffstat (limited to 'src/run-js-test.c')
-rw-r--r-- | src/run-js-test.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/run-js-test.c b/src/run-js-test.c index 1fefe292..894e2b67 100644 --- a/src/run-js-test.c +++ b/src/run-js-test.c @@ -144,6 +144,9 @@ main(int argc, char **argv) exit (1); } + gjs_context_gc (js_context); + gjs_context_gc (js_context); + g_free (script); exit (code); } |