Control.Disposing Control.Disposing Control.Disposing Control.Disposing Property

定义

获取一个值,该值指示 Control 基类是否在释放进程中。Gets a value indicating whether the base Control class is in the process of 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;否则为 falsetrue 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.

适用于

另请参阅