From fc77bca936e7d28b4e92a73289124b41cd50b553 Mon Sep 17 00:00:00 2001 From: Melanie Date: Mon, 23 Jul 2012 19:53:26 +0100 Subject: [PATCH] Committing Avination's memleak fix-a-thon, installment #3 When linking, detach the no longer used SOG's from backup so they can be collected. Since their Children collection is never emptied, they prevent their former SOPs from being collected as well. --- OpenSim/Region/Framework/Scenes/SceneGraph.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index ba68dface9..13842ad85d 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs @@ -1638,6 +1638,8 @@ namespace OpenSim.Region.Framework.Scenes { parentGroup.LinkToGroup(child); + child.DetachFromBackup(); + // this is here so physics gets updated! // Don't remove! Bad juju! Stay away! or fix physics! child.AbsolutePosition = child.AbsolutePosition;