Add "force gc" region console command which manually invokes garbage collection.

For debugging purposes.
integration
Justin Clark-Casey (justincc) 2012-10-29 22:53:06 +00:00
parent 3531f29a6a
commit c97890ca69
2 changed files with 13 additions and 1 deletions

View File

@ -192,9 +192,20 @@ namespace OpenSim.Framework.Servers
"threads show",
"Show thread status. Synonym for \"show threads\"",
(string module, string[] args) => Notice(GetThreadsReport()));
m_console.Commands.AddCommand("General", false, "force gc",
"force gc",
"Manually invoke runtime garbage collection. For debugging purposes",
HandleForceGc);
}
}
private void HandleForceGc(string module, string[] args)
{
MainConsole.Instance.Output("Manually invoking runtime garbage collection");
GC.Collect();
}
/// <summary>
/// Should be overriden and referenced by descendents if they need to perform extra shutdown processing
/// </summary>

View File

@ -74,8 +74,9 @@ namespace OpenSim.Region.Framework.Scenes
{
// ~ScenePresence()
// {
// m_log.Debug("[SCENE PRESENCE] Destructor called");
// m_log.DebugFormat("[SCENE PRESENCE]: Destructor called on {0}", Name);
// }
private void TriggerScenePresenceUpdated()
{
if (m_scene != null)