diff options
author | James J Greensky | 2009-09-30 17:30:28 -0700 |
---|---|---|
committer | Melanie | 2009-10-01 04:11:32 +0100 |
commit | 44776fea723774f0674881d69855af9657398d18 (patch) | |
tree | 272546e38e5a21bcddaf5446c9a7bc07878596b4 /OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs | |
parent | Create j2k cache directory if it doesn't exist. The Meshmerizer needs it there. (diff) | |
download | opensim-SC_OLD-44776fea723774f0674881d69855af9657398d18.zip opensim-SC_OLD-44776fea723774f0674881d69855af9657398d18.tar.gz opensim-SC_OLD-44776fea723774f0674881d69855af9657398d18.tar.bz2 opensim-SC_OLD-44776fea723774f0674881d69855af9657398d18.tar.xz |
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.
Diffstat (limited to 'OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs')
-rw-r--r-- | OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs b/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs index 798c1e7..6dd0697 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs | |||
@@ -39,7 +39,7 @@ using Timer=System.Timers.Timer; | |||
39 | 39 | ||
40 | namespace OpenSim.Region.ClientStack.LindenUDP | 40 | namespace OpenSim.Region.ClientStack.LindenUDP |
41 | { | 41 | { |
42 | public class LLPacketQueue : IPullStatsProvider | 42 | public class LLPacketQueue : IPullStatsProvider, IDisposable |
43 | { | 43 | { |
44 | private static readonly ILog m_log | 44 | private static readonly ILog m_log |
45 | = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 45 | = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
@@ -342,11 +342,17 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
342 | 342 | ||
343 | public void Close() | 343 | public void Close() |
344 | { | 344 | { |
345 | Dispose(); | ||
346 | } | ||
347 | |||
348 | public void Dispose() | ||
349 | { | ||
345 | Flush(); | 350 | Flush(); |
346 | WipeClean(); // I'm sure there's a dirty joke in here somewhere. -AFrisby | 351 | WipeClean(); // I'm sure there's a dirty joke in here somewhere. -AFrisby |
347 | 352 | ||
348 | m_enabled = false; | 353 | m_enabled = false; |
349 | throttleTimer.Stop(); | 354 | throttleTimer.Stop(); |
355 | throttleTimer.Close(); | ||
350 | 356 | ||
351 | if (StatsManager.SimExtraStats != null) | 357 | if (StatsManager.SimExtraStats != null) |
352 | { | 358 | { |