Control.Disposing Свойство
Определение
public:
property bool Disposing { bool get(); };
[System.ComponentModel.Browsable(false)]
public bool Disposing { get; }
member this.Disposing : bool
Public ReadOnly Property Disposing As Boolean
Значение свойства
Значение true
, если базовый класс Control находится в процессе удаления; в противном случае — значение false
.true
if the base Control class is in the process of disposing; otherwise, false
.
- Атрибуты
Комментарии
Когда это свойство возвращает true
, базовый класс Control находится в процессе удаления.When this property returns true
, the base Control class is in the process of disposing. После удаления элемента управления на него нельзя ссылаться как на допустимый элемент управления Windows.After the control is disposed of, it can no longer be referenced as a valid Windows control. Хотя экземпляр элемента управления удаляется, он по-прежнему сохраняется в памяти до тех пор, пока он не будет удален из памяти с помощью сборки мусора.Even though the instance of a control is disposed of, it is still maintained in memory until it is removed from memory through garbage collection. При удалении элемента управления невозможно вызвать его метод RecreateHandle.When a control is disposed of, you cannot call its RecreateHandle method.