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).

This pull request has now been integrated.

Changeset: f7948897
Author:    Jayathirth D V <[email protected]>
URL:       
https://git.openjdk.org/jfx/commit/f7948897401f1a83bf8b0597d1e9f101504ed89e
Stats:     41 lines in 4 files changed: 0 ins; 17 del; 24 mod

8389127: Native memory leak in macOS Metal 3D mesh rendering

Reviewed-by: aghaisas, arapte

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

PR: https://git.openjdk.org/jfx/pull/2243

Reply via email to