Hi,
I am using IG Version 10.3.20103.1003. I can notice the usercontrol which I am placing inside the XamContentPane is not disposing on close & with every close & open on ContentPane I can see the memory going up because the View inside the ContentPane is not disposing.
I am setting
AllowClose="True" CloseAction="RemovePane"
Also the usercontrol which I am using have a simple ListView.
Can any one please suggest any solution? Or is it a bug? I am using Windows 7 as client environment.
Hello,
Have you had a chance to create a sample that we could debug, as per Andrew's reply?
Thanks,
Sorry for delay,
I had created a standalone sample with XamDockManager & XamTabPane but it worked fine for me (means with the closing of tab GC is disposing the instance). Then I figure out that the problem is actually when you use TabGroupPane with Prism 4.0. In this case even if I am unsubscribing all the events from the view while closing, one instance of view (ContenttPane) is always present (event if GC cycle is completed).
So scenario is like this:
You make TabgroupPane a region in Shell & add multiple ContenttPane (Views) targeting to same region (Remember each view will have its viewModel & model). Now close all the views (Unsubscribe all the events on close) & trigger the GC. You will get one View instance is always present even if the ViewModel & Model corresponding to the view are disposed.
In my case this is not a big problem as the ViewModel & Model are disposed so this instance of view is not creating any memory leak. But ideally all the view instances should be disposed when you close the contentPane.
I don’t have a standalone solution (with Prism 4.0) for this to show. But if you really want see you can create one with prism 4.0 & TabGroupPane. (I am using the default adapters provided by Prism.)