aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/Scene.cs
diff options
context:
space:
mode:
authorTeravus Ovares2008-02-20 01:17:21 +0000
committerTeravus Ovares2008-02-20 01:17:21 +0000
commitb77c48e75e5027eb8ae421e9d3105eae71cd4f52 (patch)
tree1cb66947b0628a1909a5350811609435ed83e4a4 /OpenSim/Region/Environment/Scenes/Scene.cs
parent* Made a quickupdate method to run through only entities that have scheduled ... (diff)
downloadopensim-SC_OLD-b77c48e75e5027eb8ae421e9d3105eae71cd4f52.zip
opensim-SC_OLD-b77c48e75e5027eb8ae421e9d3105eae71cd4f52.tar.gz
opensim-SC_OLD-b77c48e75e5027eb8ae421e9d3105eae71cd4f52.tar.bz2
opensim-SC_OLD-b77c48e75e5027eb8ae421e9d3105eae71cd4f52.tar.xz
* Cleanup of some memory consuming items on ScenePresence.Close().
* Untangled a tangly shutdown loop for the ScenePresence. * Suggested to the Garbage Collector that this may be a good time to >.>, <.< *gasp* collect the memory.
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/Scene.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs26
1 files changed, 25 insertions, 1 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index 36e98cf..4f44d36 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -1479,7 +1479,13 @@ namespace OpenSim.Region.Environment.Scenes
1479 m_sceneGridService.LogOffUser(agentID, RegionInfo.RegionID, RegionInfo.RegionHandle, 1479 m_sceneGridService.LogOffUser(agentID, RegionInfo.RegionID, RegionInfo.RegionHandle,
1480 avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y, 1480 avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y,
1481 avatar.AbsolutePosition.Z); 1481 avatar.AbsolutePosition.Z);
1482 m_sceneGridService.SendCloseChildAgentConnections(avatar); 1482 List<ulong> childknownRegions = new List<ulong>();
1483 List<ulong> ckn = avatar.GetKnownRegionList();
1484 for (int i = 0; i < ckn.Count; i++)
1485 {
1486 childknownRegions.Add(ckn[i]);
1487 }
1488 m_sceneGridService.SendCloseChildAgentConnections(agentID, childknownRegions);
1483 } 1489 }
1484 1490
1485 m_eventManager.TriggerClientClosed(agentID); 1491 m_eventManager.TriggerClientClosed(agentID);
@@ -1554,6 +1560,22 @@ namespace OpenSim.Region.Environment.Scenes
1554 //m_log.InfoFormat("[SCENE] Memory pre GC {0}", System.GC.GetTotalMemory(false)); 1560 //m_log.InfoFormat("[SCENE] Memory pre GC {0}", System.GC.GetTotalMemory(false));
1555 //m_log.InfoFormat("[SCENE] Memory post GC {0}", System.GC.GetTotalMemory(true)); 1561 //m_log.InfoFormat("[SCENE] Memory post GC {0}", System.GC.GetTotalMemory(true));
1556 } 1562 }
1563 public void HandleRemoveKnownRegionsFromAvatar(LLUUID avatarID, List<ulong> regionslst)
1564 {
1565 ScenePresence av = GetScenePresence(avatarID);
1566 if (av != null)
1567 {
1568 lock (av)
1569 {
1570
1571 for (int i = 0; i < regionslst.Count; i++)
1572 {
1573 av.KnownChildRegions.Remove(regionslst[i]);
1574 }
1575 }
1576 }
1577
1578 }
1557 1579
1558 public override void CloseAllAgents(uint circuitcode) 1580 public override void CloseAllAgents(uint circuitcode)
1559 { 1581 {
@@ -1607,6 +1629,7 @@ namespace OpenSim.Region.Environment.Scenes
1607 m_sceneGridService.OnRegionUp += OtherRegionUp; 1629 m_sceneGridService.OnRegionUp += OtherRegionUp;
1608 m_sceneGridService.OnChildAgentUpdate += IncomingChildAgentDataUpdate; 1630 m_sceneGridService.OnChildAgentUpdate += IncomingChildAgentDataUpdate;
1609 m_sceneGridService.OnExpectPrim += IncomingInterRegionPrimGroup; 1631 m_sceneGridService.OnExpectPrim += IncomingInterRegionPrimGroup;
1632 m_sceneGridService.OnRemoveKnownRegionFromAvatar += HandleRemoveKnownRegionsFromAvatar;
1610 1633
1611 1634
1612 1635
@@ -1620,6 +1643,7 @@ namespace OpenSim.Region.Environment.Scenes
1620 /// </summary> 1643 /// </summary>
1621 public void UnRegisterReginWithComms() 1644 public void UnRegisterReginWithComms()
1622 { 1645 {
1646 m_sceneGridService.OnRemoveKnownRegionFromAvatar -= HandleRemoveKnownRegionsFromAvatar;
1623 m_sceneGridService.OnExpectPrim -= IncomingInterRegionPrimGroup; 1647 m_sceneGridService.OnExpectPrim -= IncomingInterRegionPrimGroup;
1624 m_sceneGridService.OnChildAgentUpdate -= IncomingChildAgentDataUpdate; 1648 m_sceneGridService.OnChildAgentUpdate -= IncomingChildAgentDataUpdate;
1625 m_sceneGridService.OnRegionUp -= OtherRegionUp; 1649 m_sceneGridService.OnRegionUp -= OtherRegionUp;