Hello dear Telerik Forum.
I have a memory leak problem, where opening views add up in memory, because they are still somehow referenced and thus not GCed.
I've implemented Prism and Telerik both in my application. I've also implemented the ScopedRegionNavigationContentLoader, the RegionManagerAwareBehavior (and everything else required to open views in new tabs) from Brian (Prism) and the RadTabbedWindow in my MainWindow. So when I execute RequestNavigate from the MainWindow I open new Tabs.
When I execute RequestNavigate commands from the MainWindow I successfully open a new tab which then builds the view, existing of multiple subviews. This works correct so far.
Now when I close the RadTabItems the Views still stay in the memory. It seems there are still references in the RegionManager about the once spawned Regions/Views. Those add up when using the application over hours.
So my question is:
How do I unload the Region/View in the RegionManager of the MainWindow when I close the tabs?
I'm looking for a clean and global solution, where I dont have to implement code in every class.
- There is one RegionManager in the MainWindow, which manages all Tabs and so.
- Each Subview gets its own new RegionManager instance.