On Fri, 18 Jul 2025 17:54:41 GMT, Ambarish Rapte <ara...@openjdk.org> wrote:
>> modules/javafx.graphics/src/main/java/com/sun/prism/mtl/MTLResourceFactory.java >> line 396: >> >>> 394: public void dispose() { >>> 395: super.dispose(); >>> 396: context.dispose(); >> >> Q: should we call super.dispose() _after_ context.dispose()? > > Yes, Changed the order. Any resources being used by MTLCommandQueue are made > resident, so the resources would stay alive even if MTLResourceFactory is > disposed. but the earlier order was incorrect. Normally, this would be the right thing to do. However, it looks like switching the order has introduced several crashes. I discovered this today while testing the latest version of this PR. I bisected it and found out that this was the culprit. It would be helpful to know why the order matters. If there is a good reason, then a comment would be helpful. ------------- PR Review Comment: https://git.openjdk.org/jfx/pull/1824#discussion_r2248246287