Skip to content

Fixes WPF SKGLElement has memory leaks#3311

Open
beto-rodriguez wants to merge 2 commits into
mono:mainfrom
beto-rodriguez:fixes-3309
Open

Fixes WPF SKGLElement has memory leaks#3311
beto-rodriguez wants to merge 2 commits into
mono:mainfrom
beto-rodriguez:fixes-3309

Conversation

@beto-rodriguez

@beto-rodriguez beto-rodriguez commented Jul 19, 2025

Copy link
Copy Markdown
Contributor

Updates OpenTK dependency with a version that at least includes opentk/GLWpfControl#126, finally when SKGLElement is disposed, the base GLWpfControl is also disposed.

The pair of versions picked OpenTK 4.9.4 and OpenTK.GLWpfControl 4.3.3 was the oldest pair that worked for me out of the box.

Bugs Fixed

API Changes

None.

Behavioral Changes

When SKGLElement is disposed, the base class is also disposed.

Required skia PR

None.

PR Checklist

  • Has tests (if omitted, state reason in description)
  • Rebased on top of main at time of PR
  • Merged related skia PRs
  • Changes adhere to coding standard
  • Updated documentation

This update makes it easier to clear memory leaks.
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Hey there @@beto-rodriguez! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

@mattleibow mattleibow changed the title Fixes 3309 Fixes WPF SKGLElement has memory leaks Sep 4, 2025
mattleibow added a commit that referenced this pull request Jul 3, 2026
Audit of all 11 families for over-specific/live targets that would let
the agent copy an answer instead of investigating:

- Family 4 (fixed-pointer): replace the "real, still-unfixed
  Blob.FromStream" worked example with a synthetic non-copying-native
  example; demote Blob.FromStream to a bare #3472/PR #3473 citation.
  Same for the SKILL.md cheat-sheet row 4.
- Family 3 (Views): drop the embedded live SKGLElement / open-PR #3311
  diagnosis from "Real cases"; keep the issue numbers only.
- Family 6 (clone double-free): genericize the SKPaint.Clone example to
  a neutral SKThing/sk_thing_clone wrapper; keep #2904 citation.

Remaining real symbols are all safe: documented same-instance contracts
(family 2), already-fixed issue citations, or correct reference
implementations to mirror (families 7-10). No un-fixed target is handed
to the agent as a worked answer.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

WPF SKGLElement has memory leaks [Bug]Toggle On UseGPU Cause Memory Leak

1 participant