Add "gc collect" console command for debugging memleaks
parent
d9b0b03aa3
commit
c66367e619
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue