aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorUbitUmarov2015-12-10 17:04:39 +0000
committerUbitUmarov2015-12-10 17:04:39 +0000
commit6de7da467a508a28cd11c13ed1ad2e8400520b21 (patch)
tree7977fb85e6cb76f50666a9bb9c133a3655c3e5f6 /OpenSim/Region
parentremove some SOG references on delete to help GC (diff)
downloadopensim-SC-6de7da467a508a28cd11c13ed1ad2e8400520b21.zip
opensim-SC-6de7da467a508a28cd11c13ed1ad2e8400520b21.tar.gz
opensim-SC-6de7da467a508a28cd11c13ed1ad2e8400520b21.tar.bz2
opensim-SC-6de7da467a508a28cd11c13ed1ad2e8400520b21.tar.xz
keep SOG reference to root part since two many things depend on deleted SOGs not being deleted
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs4
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs2
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs11
3 files changed, 10 insertions, 7 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs
index 2ef86c9..10b2ff6 100644
--- a/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs
@@ -721,13 +721,13 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments.Tests
721 acd.Appearance.SetAttachment((int)AttachmentPoint.Chest, attItem.ID, attItem.AssetID); 721 acd.Appearance.SetAttachment((int)AttachmentPoint.Chest, attItem.ID, attItem.AssetID);
722 ScenePresence presence = SceneHelpers.AddScenePresence(scene, acd); 722 ScenePresence presence = SceneHelpers.AddScenePresence(scene, acd);
723 723
724 SceneObjectGroup rezzedAtt = presence.GetAttachments()[0]; 724 UUID rezzedAttID = presence.GetAttachments()[0].UUID;
725 725
726 m_numberOfAttachEventsFired = 0; 726 m_numberOfAttachEventsFired = 0;
727 scene.CloseAgent(presence.UUID, false); 727 scene.CloseAgent(presence.UUID, false);
728 728
729 // Check that we can't retrieve this attachment from the scene. 729 // Check that we can't retrieve this attachment from the scene.
730 Assert.That(scene.GetSceneObjectGroup(rezzedAtt.UUID), Is.Null); 730 Assert.That(scene.GetSceneObjectGroup(rezzedAttID), Is.Null);
731 731
732 // Check events 732 // Check events
733 Assert.That(m_numberOfAttachEventsFired, Is.EqualTo(0)); 733 Assert.That(m_numberOfAttachEventsFired, Is.EqualTo(0));
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index 473c802..ee0f674 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -4851,7 +4851,7 @@ namespace OpenSim.Region.Framework.Scenes
4851 { 4851 {
4852 m_parts.Clear(); 4852 m_parts.Clear();
4853 m_sittingAvatars.Clear(); 4853 m_sittingAvatars.Clear();
4854 m_rootPart = null; 4854// m_rootPart = null;
4855 4855
4856 m_PlaySoundMasterPrim = null; 4856 m_PlaySoundMasterPrim = null;
4857 m_PlaySoundSlavePrims.Clear(); 4857 m_PlaySoundSlavePrims.Clear();
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs
index 098f1b4..ac8c32d 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs
@@ -171,11 +171,14 @@ namespace OpenSim.Region.Framework.Scenes.Tests
171 // Test that we don't get back an object for a local id that doesn't exist 171 // Test that we don't get back an object for a local id that doesn't exist
172 Assert.That(scene.GetGroupByPrim(999), Is.Null); 172 Assert.That(scene.GetGroupByPrim(999), Is.Null);
173 173
174 uint soid = so.LocalId;
175 uint spid = parts[partsToTestCount - 1].LocalId;
176
174 // Now delete the scene object and check again 177 // Now delete the scene object and check again
175 scene.DeleteSceneObject(so, false); 178 scene.DeleteSceneObject(so, false);
176 179
177 Assert.That(scene.GetGroupByPrim(so.LocalId), Is.Null); 180 Assert.That(scene.GetGroupByPrim(soid), Is.Null);
178 Assert.That(scene.GetGroupByPrim(parts[partsToTestCount - 1].LocalId), Is.Null); 181 Assert.That(scene.GetGroupByPrim(spid), Is.Null);
179 } 182 }
180 183
181 /// <summary> 184 /// <summary>
@@ -194,12 +197,12 @@ namespace OpenSim.Region.Framework.Scenes.Tests
194 SceneObjectGroup so = SceneHelpers.AddSceneObject(scene); 197 SceneObjectGroup so = SceneHelpers.AddSceneObject(scene);
195 198
196 Assert.That(so.IsDeleted, Is.False); 199 Assert.That(so.IsDeleted, Is.False);
200 uint retrievedPartID = so.LocalId;
197 201
198 scene.DeleteSceneObject(so, false); 202 scene.DeleteSceneObject(so, false);
199 203
200 Assert.That(so.IsDeleted, Is.True); 204 SceneObjectPart retrievedPart = scene.GetSceneObjectPart(retrievedPartID);
201 205
202 SceneObjectPart retrievedPart = scene.GetSceneObjectPart(so.LocalId);
203 Assert.That(retrievedPart, Is.Null); 206 Assert.That(retrievedPart, Is.Null);
204 } 207 }
205 208