Dispose() public méthode

public Dispose ( ) : void
Résultat void
		public void Remove (Halfedge halfEdge)
		{
			Halfedge previous;
			int removalBucket = Bucket (halfEdge);
			
			if (halfEdge.vertex != null) {
				previous = _hash [removalBucket];
				while (previous.nextInPriorityQueue != halfEdge) {
					previous = previous.nextInPriorityQueue;
				}
				previous.nextInPriorityQueue = halfEdge.nextInPriorityQueue;
				_count--;
				halfEdge.vertex = null;
				halfEdge.nextInPriorityQueue = null;
				halfEdge.Dispose ();
			}
		}
        public void Remove(Halfedge halfEdge)
        {
            int num = Bucket(halfEdge);

            if (halfEdge.vertex != null)
            {
                Halfedge halfedge = _hash[num];
                while (halfedge.nextInPriorityQueue != halfEdge)
                {
                    halfedge = halfedge.nextInPriorityQueue;
                }
                halfedge.nextInPriorityQueue = halfEdge.nextInPriorityQueue;
                _count--;
                halfEdge.vertex = null;
                halfEdge.nextInPriorityQueue = null;
                halfEdge.Dispose();
            }
        }
        public void Remove(Halfedge halfEdge)
        {
            Halfedge previous;
            int      removalBucket = Bucket(halfEdge);

            if (halfEdge.vertex != null)
            {
                previous = _hash[removalBucket];
                while (previous.nextInPriorityQueue != halfEdge)
                {
                    previous = previous.nextInPriorityQueue;
                }
                previous.nextInPriorityQueue = halfEdge.nextInPriorityQueue;
                _count--;
                halfEdge.vertex = null;
                halfEdge.nextInPriorityQueue = null;
                halfEdge.Dispose();
            }
        }
        public void Dispose()
        {
            Halfedge halfedge = _leftEnd;

            while (halfedge != _rightEnd)
            {
                Halfedge halfedge2 = halfedge;
                halfedge = halfedge.edgeListRightNeighbor;
                halfedge2.Dispose();
            }
            _leftEnd = null;
            _rightEnd.Dispose();
            _rightEnd = null;
            for (int i = 0; i < _hashsize; i++)
            {
                _hash[i] = null;
            }
            _hash = null;
        }
Exemple #5
0
        public void Dispose()
        {
            Halfedge halfEdge = _leftEnd;
            Halfedge prevHe;

            while (halfEdge != _rightEnd)
            {
                prevHe   = halfEdge;
                halfEdge = halfEdge.edgeListRightNeighbor;
                prevHe.Dispose();
            }
            _leftEnd = null;
            _rightEnd.Dispose();
            _rightEnd = null;

            int i;

            for (i = 0; i < _hashsize; ++i)
            {
                _hash[i] = null;
            }
            _hash = null;
        }