The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
I was wondering if there is a way to completely get rid of a form instance, no matter who has references to it.
Suppose that I have a datatable on form frmList.
I show frmDetail from a button of form list:
dim f as new frmDetail
f.Show
Now suppose frmDetail adds a handler to a datatable that lives on frmList:
AddHandler dtList.ColumnChanged, AddressOf ccHdlr
Even If I put me.Dispose in frmDetail's closed event, changes to the datatable call the handler for the previous insantce of frmDetail. I thought my form was gone when I closed it, but it lives on through the handler.
I know I can remove the handler in frmClosed. I was just wondering how to really trash the form, even if some other objects have references to it.
RPRamesh Praveen Syncfusion Team April 8, 2003 07:04 PM UTC
You cannot do this. Whenever you do a AddHandler you should also do a ReleaseHandler (in this case in your form's Dispose) so that outstanding references will be removed.
-Praveen