> This is the fix for "JDK-8389515: Memory leak in dshowwrapper - decoded > buffers delivered by CSink are never unmapped" > > To prevent leaks, the `CSample` class was refactored with new `SetGstBuffer` > and `TakeGstBuffer` methods that automatically track and manage the mapping > state of the underlying `GstBuffer`. The `Allocator` and `Sink` are updated > to use these new methods, ensuring buffers are always properly unmapped and > released when their ownership is transferred. > > The reproducer (`NativeMemoryLeakReproducer.java`) log with the fix applied: > > + d:/work/jdk/jdk25/bin/java.exe @jfx/build/run.args > NativeMemoryLeakReproducer.java demo.mp4 > Java: 25 (OpenJDK 64-Bit Server VM) > JavaFX: 28-internal (runtime 28-internal+0-2026-08-04-080015) > 451.6 MiB > 459.3 MiB > 452.4 MiB > 463.1 MiB > 465.6 MiB > 469.9 MiB > 474.9 MiB > 494.9 MiB > 498.5 MiB > 496.0 MiB > 509.4 MiB > > > --------- > - [x] I confirm that I make this contribution in accordance with the [OpenJDK > Interim AI Policy](https://openjdk.org/legal/ai).
Roman Marchenko has updated the pull request incrementally with one additional commit since the last revision: fix copyright year ------------- Changes: - all: https://git.openjdk.org/jfx/pull/2234/files - new: https://git.openjdk.org/jfx/pull/2234/files/1c52794b..7390edf5 Webrevs: - full: https://webrevs.openjdk.org/?repo=jfx&pr=2234&range=04 - incr: https://webrevs.openjdk.org/?repo=jfx&pr=2234&range=03-04 Stats: 3 lines in 3 files changed: 0 ins; 0 del; 3 mod Patch: https://git.openjdk.org/jfx/pull/2234.diff Fetch: git fetch https://git.openjdk.org/jfx.git pull/2234/head:pull/2234 PR: https://git.openjdk.org/jfx/pull/2234
