Skip to content

SvgImageSource Memory Leak #10980

@jeffintc

Description

@jeffintc

Describe the bug

There is a memory in when calling the SetSourceAsync method in SvgImageSource. Depending on how it's called, the leak may be small or may be quite large. The attached project

LeakyApp.zip

Microsoft.WindowsAppSDK = 1.8.260101001"

Why is this important?

Dynamically loading an SVG can cause memory leaks.

Steps to reproduce the bug

The attached VS solution shows the different ways the leak can be generated.

Actual behavior

No response

Expected behavior

No response

Screenshots

No response

NuGet package version

WinUI 3 - Windows App SDK 1.8.3: 1.8.251106002

Windows version

Windows 11 (24H2): Build 26100

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingneeds-triageIssue needs to be triaged by the area owners

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions