Dispose() публичный Метод

public Dispose ( ) : void
Результат void
Пример #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="target"></param>
        /// <param name="relationType"></param>
        public void Remove(GObject target, RelationType relationType)
        {
            int cnt = _items.Count;
            int i   = 0;

            while (i < cnt)
            {
                RelationItem item = _items[i];
                if (item.target == target)
                {
                    item.Remove(relationType);
                    if (item.isEmpty)
                    {
                        item.Dispose();
                        _items.RemoveAt(i);
                        cnt--;
                        continue;
                    }
                    else
                    {
                        i++;
                    }
                }
                i++;
            }
        }
Пример #2
0
        /// <summary>
        ///
        /// </summary>
        public void ClearAll()
        {
            int cnt = _items.Count;

            for (int i = 0; i < cnt; i++)
            {
                RelationItem item = _items[i];
                item.Dispose();
            }
            _items.Clear();
        }
Пример #3
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="target"></param>
 public void ClearFor(GObject target)
 {
     int cnt = _items.Count;
     int i = 0;
     while (i < cnt)
     {
         RelationItem item = _items[i];
         if (item.target == target)
         {
             item.Dispose();
             _items.RemoveAt(i);
             cnt--;
         }
         else
             i++;
     }
 }