stop keeping references to objects on released items
parent
ffececaa81
commit
bb78b327c0
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue