mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 17:05:55 +08:00
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:
committed by
Melanie
parent
1eb6f99d19
commit
44776fea72
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user