On Wed, 5 Aug 2026 09:55:45 GMT, Jayathirth D V <[email protected]> wrote:

> If a 3D Mesh is updated with different Vertices/Indices, Metal pipeline is 
> creating a new Vertex/Index MTLBuffer without releasing the old Buffer. 
> Running the sample program in JBS reveals that memory footprint increases to 
> ~300MB from the initial ~120MB after running for 30 minutes. Releasing the 
> MTLBuffer resolves this memory leak issue.
> 
> Functional and Performance testing is green with this change. Refer to JBS 
> comments for in depth details of testing. We can't reliably measure the 
> increase/decrease in memory footprint for this leak, so there is no 
> regression test.
> 
> I have also cleared the unused multi buffer logic for these Vertex/Index data.
> 
> ---------
> - [x] I confirm that I make this contribution in accordance with the [OpenJDK 
> Interim AI Policy](https://openjdk.org/legal/ai).

Sanity testing looks good and verified that with this change the memory does 
not increase as without this change. Memory consumption remains stable similar 
to es2 behavior.

-------------

Marked as reviewed by arapte (Reviewer).

PR Review: https://git.openjdk.org/jfx/pull/2243#pullrequestreview-4875033735

Reply via email to