aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
diff options
context:
space:
mode:
authorJames J Greensky2009-09-30 17:30:28 -0700
committerMelanie2009-10-01 04:11:32 +0100
commit44776fea723774f0674881d69855af9657398d18 (patch)
tree272546e38e5a21bcddaf5446c9a7bc07878596b4 /OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
parentCreate j2k cache directory if it doesn't exist. The Meshmerizer needs it there. (diff)
downloadopensim-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 '')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs23
1 files changed, 19 insertions, 4 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index 9788f40..460f94e 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -633,6 +633,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
633 // of the client thread regardless of where Close() is called. 633 // of the client thread regardless of where Close() is called.
634 KillEndDone(); 634 KillEndDone();
635 } 635 }
636
637 Terminate();
636 } 638 }
637 639
638 /// <summary> 640 /// <summary>
@@ -737,16 +739,24 @@ namespace OpenSim.Region.ClientStack.LindenUDP
737 739
738 } 740 }
739 741
740 public void Terminate() 742 private void Terminate()
741 { 743 {
744 IsActive = false;
745
746 m_clientPingTimer.Close();
747 m_avatarTerseUpdateTimer.Close();
748 m_primTerseUpdateTimer.Close();
749 m_primFullUpdateTimer.Close();
750 m_textureRequestTimer.Close();
751
742 m_PacketHandler.OnPacketStats -= PopulateStats; 752 m_PacketHandler.OnPacketStats -= PopulateStats;
743 m_PacketHandler.Stop(); 753 m_PacketHandler.Dispose();
744 754
745 // wait for thread stoped 755 // wait for thread stoped
746 m_clientThread.Join(); 756 // m_clientThread.Join();
747 757
748 // delete circuit code 758 // delete circuit code
749 m_networkServer.CloseClient(this); 759 //m_networkServer.CloseClient(this);
750 } 760 }
751 761
752 #endregion 762 #endregion
@@ -876,6 +886,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
876 while (IsActive) 886 while (IsActive)
877 { 887 {
878 LLQueItem nextPacket = m_PacketHandler.PacketQueue.Dequeue(); 888 LLQueItem nextPacket = m_PacketHandler.PacketQueue.Dequeue();
889
890 if (nextPacket == null) {
891 m_log.DebugFormat("[CLIENT]: PacketQueue return null LLQueItem");
892 continue;
893 }
879 894
880 if (nextPacket.Incoming) 895 if (nextPacket.Incoming)
881 { 896 {