mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 00:46:02 +08:00
Add "gc collect" console command for debugging memleaks
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user