Replies: 1 comment 1 reply
-
Hi JoJeremy, Memory leaks in WPF, especially with a code-behind approach, are often due to: Unreleased Event Handlers – Ensure you unsubscribe events on form close. Since your setup mimics VBA, WPF’s MVVM benefits aren’t leveraged, making cleanup more critical. Let me know if you need specific solutions! |
Beta Was this translation helpful? Give feedback.
-
Hello everyone
First of all, many thanks to the developpers for this framework first, it's a great project :)
I'm part of a small enterprise who commercialise a big VBA application to different clients since a bit more than 20 years now
1 year before I was recruited, this organisation starts to migrate the code to VBNet because it's close enough to VBA to automatize some part of the migration.
They choose WPF and MaterialDesign for the responsive design and nice looking forms.
The code is built exclusively on code-behind function and Module so the migration keeps the old Non Object Programming design.
Most components used are overloads to mimic 2-3 old VBA properties overly used by old code.
The 20 most used forms are carrying a lot of this custom components.
It's working well and nice, except one thing : the forms are consuming a lot of memory that isn't released after the destruction of the owner's forms object.
So the memory consumed grows quickly to several hundreds after several minutes of normal using (go to a form, open another, make actions, ...).
I've tried to purge some properties after the destruction of the form but even the default datagrid component (with only DatagridTextBox column and some default event triggers) never release it's memory.
Maybe the code-behind approach itself is the cause of the bound to memory?
Cheers
Jérémy
Beta Was this translation helpful? Give feedback.
All reactions