How to properly Load/Save layouts?

Docking/MDI for WPF Forum

Posted 14 years ago by Tim Solovyov
Version: 9.1.0502
Avatar
I run Sample Browser under VS debuger. Set the breakpoint at Actipro Software\WPFStudio\v9.1.0502\SampleBrowser\ProductSamples\DockingSamples\Demo\Features\MainControl.xaml.cs, line 210:

private void LoadLayout() {
new DockSiteLayoutSerializer().LoadFromString(layoutTextBox.Text, dockSite);
}

And got it each time menu File->Load Layout selected. When press F10 (Step Over) I can see in the output something like:

'SampleBrowser.vshost.exe' (Managed): Loaded 'ljmknyvs'

Each time the name of the module(?) is different. After that I can observe this module in the modules list and it is never unloaded.

We are running an automative test on our UI application which Load/Save layouts intensively. After 5-6 hours of working the application failed with OutOfMemory exception. I can observe at about 2500 such a pseudo-modules loaded at this moment.

1. Could it be a reason of out of memory?
2. How to properly Load/Save layouts, so these pseudo-modules could be unloaded?

Comments (1)

Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Tim,

XML serializers (what we use for layouts) do generate a new module when they are created and they don't unload. We became aware of this memory leak after the build you have and fixed it in build 504. I'd recommend getting the latest build since we now cache the XML serializer to prevent this from happening.


Actipro Software Support

The latest build of this product (v24.1.1) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.