On Fri, 31 Jul 2026 18:42:20 GMT, Roman Marchenko <[email protected]> wrote:
> 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). This pull request has now been integrated. Changeset: 7533c615 Author: Roman Marchenko <[email protected]> Committer: Kevin Rushforth <[email protected]> URL: https://git.openjdk.org/jfx/commit/7533c6156a76597bd39a8f935585796bbfa19ef6 Stats: 71 lines in 3 files changed: 53 ins; 9 del; 9 mod 8389515: Memory leak in dshowwrapper - decoded buffers delivered by CSink are never unmapped Reviewed-by: kcr, almatvee ------------- PR: https://git.openjdk.org/jfx/pull/2234
