Skip to content

[Bug]Toggle On UseGPU Cause Memory Leak #1862

@c0nstexpr

Description

@c0nstexpr

Add LiveCharts.UseGPU = true at app startup and use following xaml layout

<Window x:Class="WpfApp.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:lvc="clr-namespace:LiveChartsCore.SkiaSharpView.WPF;assembly=LiveChartsCore.SkiaSharpView.WPF"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
        xmlns:wpfapp="clr-namespace:WpfApp"
        Title="MainWindow"
        Width="800"
        Height="450"
        mc:Ignorable="d">
    <TabControl>
        <TabItem Header="1">
            <StackPanel>
                <lvc:CartesianChart/>
                <lvc:CartesianChart/>
                <lvc:CartesianChart/>
                <lvc:CartesianChart/>
                <lvc:CartesianChart/>
                <lvc:CartesianChart/>
                <lvc:CartesianChart/>
            </StackPanel>
        </TabItem>

        <TabItem Header="2">
            <StackPanel>
                <lvc:CartesianChart/>
                <lvc:CartesianChart/>
                <lvc:CartesianChart/>
                <lvc:CartesianChart/>
                <lvc:CartesianChart/>
                <lvc:CartesianChart/>
                <lvc:CartesianChart/>
            </StackPanel>
        </TabItem>
    </TabControl>
</Window>

Once we switch between the tab items, the memory usage increased

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingrequires external featuresWe can not fix this for now, we need a feature that is out of this library.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions