modern-forms / Modern.Forms

Cross-platform spiritual successor to Winforms for .NET 6+
MIT License
847 stars 54 forks source link

Memory leak due to event handler #20

Open ghost opened 4 years ago

ghost commented 4 years ago

Here's a memory leak: https://github.com/modern-forms/Modern.Forms/blob/51f917aea77b2ae4fe88eadd18988fb3633402fd/src/Modern.Forms/Control.cs#L53

jpobst commented 4 years ago

Nice catch! I'll have to give some thought to how I want to fix this.

jzlhll commented 4 years ago

Sound like singleInstance add handler once again. Maybe should remove it before add or only add once.