public DLink baseAddSorted(float time) { // Are there any nodes on the Reserve list? if (this.poReserve == null) { // refill the reserve list by the DeltaGrow this.PrivFillReservedPool(this.mDeltaGrow); } // Always take from the reserve list DLink pLink = DLink.PopFromFront(ref this.poReserve); Debug.Assert(pLink != null); // Wash it this.DerivedWash(pLink); // Update stats this.mNumActive++; this.mNumReserved--; DLink.addSorted(ref this.poActive, pLink, time); return(pLink); }
protected DLink BaseAdd() { // Are there any nodes on the Reserve list? if (this.poReserve == null) { // refill the reserve list by the DeltaGrow this.PrivFillReservedPool(this.mDeltaGrow); } // Always take from the reserve list DLink pLink = DLink.PopFromFront(ref this.poReserve); Debug.Assert(pLink != null); // Wash it this.DerivedWash(pLink); // Update stats this.mNumActive++; this.mNumReserved--; // copy to active DLink.AddToFront(ref this.poActive, pLink); // YES - here's your new one (its recycled from reserved) return(pLink); }