remove some SOG references on delete to help GC

This commit is contained in:
UbitUmarov
2015-12-10 14:00:43 +00:00
parent bdab95f1d2
commit 62009ba9c0
3 changed files with 23 additions and 3 deletions

View File

@@ -764,6 +764,7 @@ namespace OpenSim.Region.Framework.Scenes
}
avsToCross.Clear();
sog.RemoveScriptInstances(true);
sog.Clear();
return sog;
}
else // cross failed, put avas back ??
@@ -2245,7 +2246,6 @@ namespace OpenSim.Region.Framework.Scenes
{
part.Inventory.ProcessInventoryBackup(datastore);
// take the change to delete things
if(part.KeyframeMotion != null)
{
part.KeyframeMotion.Delete();
@@ -2253,7 +2253,7 @@ namespace OpenSim.Region.Framework.Scenes
}
});
backup_group.Clear();
backup_group = null;
}
// else
@@ -4846,6 +4846,20 @@ namespace OpenSim.Region.Framework.Scenes
});
}
// clear some references to easy cg
public void Clear()
{
m_parts.Clear();
m_sittingAvatars.Clear();
m_rootPart = null;
m_PlaySoundMasterPrim = null;
m_PlaySoundSlavePrims.Clear();
m_LoopSoundMasterPrim = null;
m_targets.Clear();
}
#endregion
}
}