private void btnMail_Click(object sender, EventArgs e)
{
new formCustomerReportMailer().Show();
}
Is it ill-advised to create a form without assigning it to variable? I don’t plan to use it otherwise and it seems that forcefully calling the garbage collector to collect unused references doesn’t seem to close the form. Any downside to this or future problems?
Yes, you should dispose the form. It isn’t automatic when you use ShowDialog(). Why is this a dialog in the first place when you are not interested in the results?
After edit: this is not a problem. The exact same thing happens in Program.cs