[英]Control on a tabpage
Why the control.OnHandleDestroyed() is not called when the parent TabPage is removed using the tabControl1.RemoveAt() call? 当使用tabControl1.RemoveAt()调用删除父TabPage时,为什么不调用control.OnHandleDestroyed()?
Thanks. 谢谢。
May be Dispose is not called on removed TabPages..You can add 可能是在删除的TabPage上未调用Dispose。
Dispose();
or 要么
GC.Collect();
GC.WaitForPendingFinalizers();
after removing to force garbage collector run its cycle. 移除后强制垃圾收集器运行其循环。
Hope that helps. 希望能有所帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.