I have a WPF/E application which is seeing huge performance issues along with memory leaks.
Using the .NET memory profiler by red gate did help, but what concerns me is that objects(>100MB after 10 mins of usage) keep staying at Generation 2 of GC.
This leads to performance issues as the app significantly slows down. Calling the GC.Collect() does reclaim some of the memory, but this is not the solution as calling GC is not recommended- and i also do not want objects to move to Gen 2 in the first place.
Are there any best practices to follow in the WPF MVVM pattern(or otherwise) so that objects that reach Gen 2 remain at a minimum? Thanks in advance!