Control.Disposing 属性
定义
public:
property bool Disposing { bool get(); };
[System.ComponentModel.Browsable(false)]
public bool Disposing { get; }
[<System.ComponentModel.Browsable(false)>]
member this.Disposing : bool
Public ReadOnly Property Disposing As Boolean
属性值
如果 Control 基类在释放进程中,则为 true
;否则为 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.