From 44776fea723774f0674881d69855af9657398d18 Mon Sep 17 00:00:00 2001 From: James J Greensky Date: Wed, 30 Sep 2009 17:30:28 -0700 Subject: 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. --- OpenSim/Framework/BlockingQueue.cs | 5 ++++- OpenSim/Framework/IClientAPI.cs | 1 - 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'OpenSim/Framework') diff --git a/OpenSim/Framework/BlockingQueue.cs b/OpenSim/Framework/BlockingQueue.cs index e03229b..857930a 100644 --- a/OpenSim/Framework/BlockingQueue.cs +++ b/OpenSim/Framework/BlockingQueue.cs @@ -66,7 +66,9 @@ namespace OpenSim.Framework if (m_pqueue.Count > 0) return m_pqueue.Dequeue(); - return m_queue.Dequeue(); + if (m_queue.Count > 0) + return m_queue.Dequeue(); + return default(T); } } @@ -119,6 +121,7 @@ namespace OpenSim.Framework { m_pqueue.Clear(); m_queue.Clear(); + Monitor.Pulse(m_queueSync); } } } diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs index 430cbd7..91a5d5c 100644 --- a/OpenSim/Framework/IClientAPI.cs +++ b/OpenSim/Framework/IClientAPI.cs @@ -1127,7 +1127,6 @@ namespace OpenSim.Framework void SetClientOption(string option, string value); string GetClientOption(string option); - void Terminate(); void SendSetFollowCamProperties(UUID objectID, SortedDictionary parameters); void SendClearFollowCamProperties(UUID objectID); -- cgit v1.1