aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-02-13 00:52:49 +0000
committerJustin Clarke Casey2008-02-13 00:52:49 +0000
commit1677bde48027f13ed986a865951f3e94fe3499b7 (patch)
tree716bd3eef7bea295efff79050160694f50aab934
parent* Refactor: Move last commit's refactor back to AgentAssetTransactionsManager (diff)
downloadopensim-SC-1677bde48027f13ed986a865951f3e94fe3499b7.zip
opensim-SC-1677bde48027f13ed986a865951f3e94fe3499b7.tar.gz
opensim-SC-1677bde48027f13ed986a865951f3e94fe3499b7.tar.bz2
opensim-SC-1677bde48027f13ed986a865951f3e94fe3499b7.tar.xz
* Clean up the agent's asset transactions when it is removed from the scene
* This may or may not help with the memory leak, need to assess
-rw-r--r--OpenSim/Framework/Communications/Cache/AgentAssetTransactionsManager.cs19
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs2
2 files changed, 19 insertions, 2 deletions
diff --git a/OpenSim/Framework/Communications/Cache/AgentAssetTransactionsManager.cs b/OpenSim/Framework/Communications/Cache/AgentAssetTransactionsManager.cs
index 48b2563..82fe4c0 100644
--- a/OpenSim/Framework/Communications/Cache/AgentAssetTransactionsManager.cs
+++ b/OpenSim/Framework/Communications/Cache/AgentAssetTransactionsManager.cs
@@ -78,9 +78,24 @@ namespace OpenSim.Framework.Communications.Cache
78 = new AgentAssetTransactions(userID, this, m_dumpAssetsToFile); 78 = new AgentAssetTransactions(userID, this, m_dumpAssetsToFile);
79 AgentTransactions.Add(userID, transactions); 79 AgentTransactions.Add(userID, transactions);
80 } 80 }
81 } 81
82 return AgentTransactions[userID];
83 }
84 }
85
86 /// <summary>
87 /// Remove the given agent asset transactions. This should be called when a client is departing
88 /// from a scene (and hence won't be making any more transactions here).
89 /// </summary>
90 /// <param name="userID"></param>
91 public void RemoveAgentAssetTransactions(LLUUID userID)
92 {
93 m_log.DebugFormat("Removing agent asset transactions structure for agent {0}", userID);
82 94
83 return AgentTransactions[userID]; 95 lock (AgentTransactions)
96 {
97 AgentTransactions.Remove(userID);
98 }
84 } 99 }
85 100
86 /// <summary> 101 /// <summary>
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index 62437cf..d763d35 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -1466,6 +1466,8 @@ namespace OpenSim.Region.Environment.Scenes
1466 1466
1467 ForEachScenePresence( 1467 ForEachScenePresence(
1468 delegate(ScenePresence presence) { presence.CoarseLocationChange(); }); 1468 delegate(ScenePresence presence) { presence.CoarseLocationChange(); });
1469
1470 CommsManager.TransactionsManager.RemoveAgentAssetTransactions(agentID);
1469 1471
1470 lock (m_scenePresences) 1472 lock (m_scenePresences)
1471 { 1473 {