Control.IsDisposed 属性
定义
获取一个值,该值指示控件是否已经被释放。Gets a value indicating whether the control has been disposed of.
public:
property bool IsDisposed { bool get(); };
[System.ComponentModel.Browsable(false)]
public bool IsDisposed { get; }
[<System.ComponentModel.Browsable(false)>]
member this.IsDisposed : bool
Public ReadOnly Property IsDisposed As Boolean
属性值
如果控件已经被释放,则为 true
;否则为 false
。true
if the control has been disposed of; otherwise, false
.
- 属性
注解
此属性返回时 true
,将释放该控件,并且该控件不能再作为有效的 Windows 控件进行引用。When this property returns true
, the control is disposed of and 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, you cannot call its RecreateHandle method.