On Mon, 3 Nov 2025 23:57:50 GMT, Kevin Rushforth <[email protected]> wrote:
>> Might be worth adding a comment that the resource is freed natively so >> there's no need to dereference. > > That might be a good idea (for all pipelines). ~~It does make more sense, I noticed that we also often check `resource.isValid()` but we don't precede it with `resource == null` which would cause another potential NPE.~~ I'll revert this and add a comment in all backend-specific `*TextureResource` classes **EDIT:** I got the `resource` instances mixed up - the checks I was thinking of would be for an instance of `D3D/ES2/MTLTextureResource`, not its underlying `D3D/ES2/MTLTextureData` instance that is also referred to as `resource` variable. Still, the `ManagedResource` class that we extend in the backends will handle the `resource = null` set, so this addition is redundant. ------------- PR Review Comment: https://git.openjdk.org/jfx/pull/1951#discussion_r2488936531
