Welcome Guest Search | Active Topics | Sign In | Register

Memory Leak in DockView Options
Kristian
Posted: Friday, February 6, 2015 3:47:56 AM
Rank: Newbie
Groups: Member

Joined: 1/28/2015
Posts: 1
Hi,

I recognized a Problem with the DockView, that results in huge problems for me.
I created an application, that uses the DockView and provides a Control on each tab, that requires round about 100-200MB of Memory. The problem here is, that if I close the DockItem, the memory stays in use and will not be garbage collected.

To reproduce this issue, simply create a new WPF-Application, Add the EO.WPF-Library as Reference and use this XAML-Code (no code is required in code behind):

Code: XML
<Window
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:eo="http://schemas.essentialobjects.com/wpf/" x:Class="EOtest.MainWindow"
        Title="MainWindow" Height="350" Width="525">
    <Grid>

        <eo:DockContainer>
            <eo:DockView Dock="Right">
                <eo:DockItem Title="Button">
                    <Button Content="Hi"/>
                </eo:DockItem>
            </eo:DockView>
            <eo:DockView Dock="Bottom">
                <eo:DockItem Title="ProgressBar">
                    <ProgressBar/>
                </eo:DockItem>
            </eo:DockView>
            <eo:DockView IsDocumentView="True">
                <eo:DockItem Title="Content1" >
                    <WebBrowser Source="http://www.bild.de"/> <!-- Website with many ads, so it uses round about 100MB of RAM -->
                </eo:DockItem>
                <eo:DockItem Title="Content2">
                    <WebBrowser Source="http://www.bild.de"/>
                </eo:DockItem>
                <eo:DockItem Title="Content3">
                    <WebBrowser Source="http://www.bild.de"/>
                </eo:DockItem>
                <eo:DockItem Title="Content4">
                    <WebBrowser Source="http://www.bild.de"/>
                </eo:DockItem>
            </eo:DockView>
        </eo:DockContainer>

    </Grid>
</Window>


If you start the Application, round about 300MB of RAM is used. If you close the four document-items with the website, you still have this amount of RAM in use (or even some MB more).
My expectation is, that the Memory will be garbage collected, so after I close all tabs, there is just ~50MB of memory in use.


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.