1
0
forked from mirrors/0ad

Run GC frequently in the simulation script context, to keep memory usage down

This was SVN commit r8622.
This commit is contained in:
Ykkrosh
2010-11-15 15:03:40 +00:00
parent 58a95ba95c
commit 13d2e44ff5
3 changed files with 12 additions and 0 deletions
@@ -777,6 +777,10 @@ void ScriptInterface::DumpHeap()
fprintf(stderr, "# Bytes allocated after GC: %d\n", JS_GetGCParameter(m->m_rt, JSGC_BYTES));
}
void ScriptInterface::MaybeGC()
{
JS_MaybeGC(m->m_cx);
}
class ValueCloner
{