aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorUbitUmarov2015-12-10 14:00:43 +0000
committerUbitUmarov2015-12-10 14:00:43 +0000
commit62009ba9c02590f689d202da1753c91498f5b51d (patch)
treeacee356affc2af61db3eb029587a3128cba7929f
parentdont try to process packets for deleted clients (diff)
downloadopensim-SC_OLD-62009ba9c02590f689d202da1753c91498f5b51d.zip
opensim-SC_OLD-62009ba9c02590f689d202da1753c91498f5b51d.tar.gz
opensim-SC_OLD-62009ba9c02590f689d202da1753c91498f5b51d.tar.bz2
opensim-SC_OLD-62009ba9c02590f689d202da1753c91498f5b51d.tar.xz
remove some SOG references on delete to help GC
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs1
-rwxr-xr-xOpenSim/Region/Framework/Scenes/Scene.cs7
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs18
3 files changed, 23 insertions, 3 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
index 39e3526..a21b52c 100644
--- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
@@ -1083,6 +1083,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
1083 1083
1084 // Now, remove the scripts 1084 // Now, remove the scripts
1085 so.RemoveScriptInstances(true); 1085 so.RemoveScriptInstances(true);
1086 so.Clear();
1086 } 1087 }
1087 1088
1088 protected SceneObjectGroup RezSingleAttachmentFromInventoryInternal( 1089 protected SceneObjectGroup RezSingleAttachmentFromInventoryInternal(
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 8bdf39a..9061244 100755
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -1577,6 +1577,7 @@ namespace OpenSim.Region.Framework.Scenes
1577 m_heartbeatThread = null; 1577 m_heartbeatThread = null;
1578 } 1578 }
1579 1579
1580 GC.Collect();
1580 // tell physics to finish building actor 1581 // tell physics to finish building actor
1581 m_sceneGraph.ProcessPhysicsPreSimulation(); 1582 m_sceneGraph.ProcessPhysicsPreSimulation();
1582 1583
@@ -2798,7 +2799,11 @@ namespace OpenSim.Region.Framework.Scenes
2798 if (!silent) 2799 if (!silent)
2799 SendKillObject(new List<uint>() { group.LocalId }); 2800 SendKillObject(new List<uint>() { group.LocalId });
2800 2801
2801 // m_log.DebugFormat("[SCENE]: Exit DeleteSceneObject() for {0} {1}", group.Name, group.UUID); 2802 // use this to mean also full delete
2803 if (removeScripts)
2804 group.Clear();
2805 partList = null;
2806 // m_log.DebugFormat("[SCENE]: Exit DeleteSceneObject() for {0} {1}", group.Name, group.UUID);
2802 } 2807 }
2803 2808
2804 /// <summary> 2809 /// <summary>
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index 71d9017..473c802 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -764,6 +764,7 @@ namespace OpenSim.Region.Framework.Scenes
764 } 764 }
765 avsToCross.Clear(); 765 avsToCross.Clear();
766 sog.RemoveScriptInstances(true); 766 sog.RemoveScriptInstances(true);
767 sog.Clear();
767 return sog; 768 return sog;
768 } 769 }
769 else // cross failed, put avas back ?? 770 else // cross failed, put avas back ??
@@ -2245,7 +2246,6 @@ namespace OpenSim.Region.Framework.Scenes
2245 { 2246 {
2246 part.Inventory.ProcessInventoryBackup(datastore); 2247 part.Inventory.ProcessInventoryBackup(datastore);
2247 2248
2248 // take the change to delete things
2249 if(part.KeyframeMotion != null) 2249 if(part.KeyframeMotion != null)
2250 { 2250 {
2251 part.KeyframeMotion.Delete(); 2251 part.KeyframeMotion.Delete();
@@ -2253,7 +2253,7 @@ namespace OpenSim.Region.Framework.Scenes
2253 } 2253 }
2254 }); 2254 });
2255 2255
2256 2256 backup_group.Clear();
2257 backup_group = null; 2257 backup_group = null;
2258 } 2258 }
2259// else 2259// else
@@ -4846,6 +4846,20 @@ namespace OpenSim.Region.Framework.Scenes
4846 }); 4846 });
4847 } 4847 }
4848 4848
4849 // clear some references to easy cg
4850 public void Clear()
4851 {
4852 m_parts.Clear();
4853 m_sittingAvatars.Clear();
4854 m_rootPart = null;
4855
4856 m_PlaySoundMasterPrim = null;
4857 m_PlaySoundSlavePrims.Clear();
4858 m_LoopSoundMasterPrim = null;
4859 m_targets.Clear();
4860 }
4861
4849 #endregion 4862 #endregion
4850 } 4863 }
4864
4851} 4865}