Repository navigation
|
I ran into this while digging at one of my benchmarks with latent active textures. https://github.com/visgl/luma.gl/blob/master/modules/core/src/adapter/resources/framebuffer.ts#L154 this.colorAttachments.forEach((colorAttachment, i) => {
const resizedTexture = colorAttachment.texture.clone({
width,
height
});
this.destroyAttachedResource(colorAttachment);
this.colorAttachments[i] = resizedTexture.view;
this.attachResource(resizedTexture.view); // <---
});Does this not leak? It tracks the view, not the texture. The depth attachment a few lines later seems to do it correctly: if (this.depthStencilAttachment) {
const resizedTexture = this.depthStencilAttachment.texture.clone({
width,
height
});
this.destroyAttachedResource(this.depthStencilAttachment);
this.depthStencilAttachment = resizedTexture.view;
this.attachResource(resizedTexture); // <---
} |
Answered by
ibgreen
Oct 5, 2026
Replies: 2 comments
|
This looks like a legitimate finding, I will do some work to see how a solution might look, as a P2. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Opened a fix PR: #3395. It corrects texture ownership and cleanup during framebuffer resize and cloning, and adds lifecycle regression tests. All PR CI checks passed.