Fixing LLClientView memory leak

Fixing LLClientView memory leak by disposing of all timers utilized
in LLClientView as they contain references to the callback method.
This required the use of the Terminate and Close infrastructure that
was already in place but was not being utilized.
This commit is contained in:
James J Greensky
2009-09-30 17:30:28 -07:00
committed by Melanie
parent 1eb6f99d19
commit 44776fea72
6 changed files with 33 additions and 10 deletions

View File

@@ -39,7 +39,7 @@ using Timer=System.Timers.Timer;
namespace OpenSim.Region.ClientStack.LindenUDP
{
public class LLPacketQueue : IPullStatsProvider
public class LLPacketQueue : IPullStatsProvider, IDisposable
{
private static readonly ILog m_log
= LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
@@ -341,12 +341,18 @@ namespace OpenSim.Region.ClientStack.LindenUDP
}
public void Close()
{
Dispose();
}
public void Dispose()
{
Flush();
WipeClean(); // I'm sure there's a dirty joke in here somewhere. -AFrisby
m_enabled = false;
throttleTimer.Stop();
throttleTimer.Close();
if (StatsManager.SimExtraStats != null)
{