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:
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user