Create one form (Set as a startup form) having ToolStrip with ToolStripButton and ToolStripComboBox. On the button, click open an instance of this form and close the new instance. Observe the GDI Objects before opening the form and after Opening & Closing the form. Looks like a bug but how to deal with it?
Task Manager & GDIView can be used to observe the results.
Edit
When we open the form Font count goes up by 7 and on close, the count goes down by 6. 1 is left and never collected. Event If I invoke GC.Collect() with forced parameters or wait for serval minutes that one Font object is never collected. If my application is running for hours and different editors (Forms) having toolbar are opened then closed it keeps growing.
question from:
https://stackoverflow.com/questions/65838945/winforms-toolstripcombobox-leaks-memory-font-region 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…