Merge branch 'master' of /home/opensim/var/repo/opensim

integration
BlueWall 2012-07-23 14:52:35 -04:00
commit 8d815872b9
2 changed files with 18 additions and 5 deletions

View File

@ -101,6 +101,11 @@ namespace OpenSim.Framework
{
item = oldHeadNext.Item;
haveAdvancedHead = CAS(ref head, oldHead, oldHeadNext);
if (haveAdvancedHead)
{
oldHeadNext.Item = default(T);
oldHead.Next = null;
}
}
}
}
@ -111,6 +116,10 @@ namespace OpenSim.Framework
public void Clear()
{
// ugly
T item;
while(count > 0)
Dequeue(out item);
Init();
}

View File

@ -63,12 +63,15 @@ namespace OpenSim.Framework
internal void Clear()
{
this.value = default(T);
if (this.handle != null)
{
this.handle.Clear();
this.handle = null;
ClearRef();
}
internal void ClearRef()
{
this.value = default(T);
this.handle = null;
}
}
@ -285,6 +288,7 @@ namespace OpenSim.Framework
if (--this.size > 0 && index != this.size)
{
Set(this.items[this.size], index);
this.items[this.size].ClearRef();
if (!BubbleUp(index))
BubbleDown(index);
}