Add "gc collect" console command for debugging memleaks

This commit is contained in:
Melanie
2012-07-12 00:16:19 +02:00
parent d9b0b03aa3
commit c66367e619

View File

@@ -831,6 +831,8 @@ namespace OpenSim.Region.Framework.Scenes
StatsReporter = new SimStatsReporter(this);
StatsReporter.OnSendStatsResult += SendSimStatsPackets;
StatsReporter.OnStatsIncorrect += m_sceneGraph.RecalculateStats;
MainConsole.Instance.Commands.AddCommand("scene", false, "gc collect", "gc collect", "gc collect", "Cause the garbage collector to make a single pass", HandleGcCollect);
}
/// <summary>
@@ -5637,5 +5639,10 @@ Environment.Exit(1);
}
}
}
private void HandleGcCollect(string module, string[] args)
{
GC.Collect();
}
}
}