Skip to content

[Android] FrameworkTemplatePool is not able to grab disposed views #13969

Closed

Description

@jeromelaban

Current behavior

On Android, the FrameworkTemplatePool hooks onto Parent changed to get instances back into the pool, yet android instances are collected by the GC in such a way that the instances never notify of their parent changes.

USE_HARD_REFERENCES:

private readonly HashSet<UIElement> _activeInstances = new HashSet<View>();

may be of help, but activating this tracking prevents instances from collecting altogether, likely because of their native counterparts referencing each other.

This may be a behavior that has changed since moving to .NET 6+.

Activity

  1. added
    kind/bug
    triage/untriaged
    difficulty/tbd
    area/performance 📈
    project/core-tools 🛠️
    and removed
    triage/untriaged
    on Oct 12, 2023
  2. changed the title [-][Android] FrameworkTemplatePool is not able to grab disposed views[/-] [+][Android] `FrameworkTemplatePool` is not able to grab disposed views[/+] on Oct 25, 2023
  3. added
    difficulty/challenging 🤯
    and removed
    difficulty/tbd
    on Oct 25, 2023
  4. MartinZikmund commented on Jul 21, 2025

    @MartinZikmund
    Member

    This is not relevant for Skia Android

  5. github-actions commented on May 4, 2026

    @github-actions
    Contributor

    This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs or feature requests.

  6. locked as resolved and limited conversation to collaborators on May 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/performance 📈difficulty/challenging 🤯kind/bugproject/core-tools 🛠️

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions