Skip to content

Memory Leak Switching Activities #12253

Description

@dodgei

Android framework version

net11.0-android (Preview)

Affected platform version

Visual Studio 2026 v18.7.3

Description

Having experienced the same issue as #10989 I tested the fix in .NET11 Preview 6 but it still seems to be present.

Created a small app which auto switches between 2 activities the native memory increases until the application crashes. Memory viewed in Android Studio Live Telemetry.

Image

Steps to Reproduce

Install application on an Android device from https://github.com/dodgei/android_leak/tree/main/LeakTest

Witness the climbing native memory in a profiler.

Did you find any workaround?

I found that calling GC.Collect(); in OnDestroy(); or OnCreate(); keeps the memory stable

Relevant log output

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions