This is the clean backport of "JDK-8389515: Memory leak in dshowwrapper - decoded buffers delivered by CSink are never unmapped" to jfx27u.
I'm backporting this because jfx27u is affected with the memory leak problem. The problem is reproduced before the fix and gone after the fix: Java: 25 (OpenJDK 64-Bit Server VM) JavaFX: 27.0.1-internal (runtime 27.0.1-internal+0-2026-08-06-112744) 459.9 MiB 3187.2 MiB 5866.6 MiB 8593.7 MiB 11338.2 MiB 14018.4 MiB 16719.9 MiB ... Java: 25 (OpenJDK 64-Bit Server VM) JavaFX: 27.0.1-internal (runtime 27.0.1-internal+0-2026-08-06-112744) 448.9 MiB 475.3 MiB 454.8 MiB 456.2 MiB 458.8 MiB 457.1 MiB 456.1 MiB 456.3 MiB --------- - [x] I confirm that I make this contribution in accordance with the [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai). ------------- Commit messages: - Backport 7533c6156a76597bd39a8f935585796bbfa19ef6 Changes: https://git.openjdk.org/jfx27u/pull/8/files Webrev: https://webrevs.openjdk.org/?repo=jfx27u&pr=8&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8389515 Stats: 71 lines in 3 files changed: 53 ins; 9 del; 9 mod Patch: https://git.openjdk.org/jfx27u/pull/8.diff Fetch: git fetch https://git.openjdk.org/jfx27u.git pull/8/head:pull/8 PR: https://git.openjdk.org/jfx27u/pull/8
