Removing view that contain regions

Topics: Prism v4 - WPF 4
Jun 23, 2011 at 7:46 AM
Edited Jun 23, 2011 at 7:48 AM

Hi,

I'm using prism 4 to implement MVVM in my application.
My application contains view that has several regions within,when I'm removing this view from its container region it's seems like the regions in the view are still exist in memory.

I would like to know if removing view doesn't effect its inner regions and what is the best way to handel the case of hierarchy removing (I tried to do it with recursion but it takes a lot of time)

Thanks

Eran

Jun 23, 2011 at 3:03 PM

Hi Eran,

This is an existing issue on Prism v2 and v4, you could take a look at the Damian Schenkelman’s Blog post, which proposes a workaround for this behavior:

Memory Leak removing View with child regions in Prism-v2

I hope you find this information useful.

Thanks,

Miguel Bronzovic
http://blogs.southworks.net/mbronzovic

Jun 26, 2011 at 6:23 AM

Hi Miguel,

Thanks a lot for your reply it sure did helped me to understand the problem better ,but unfortunately it didn't improve the performence.

I think I will open new discussion about adding/removing a lot of views to a region vs. using classic items source binding.
Thanks any way
Eran