Skip to content

Commit 4a23c73

Browse files
committed
fix(soba): dispose texture on environment cube destroyed
1 parent b7650b2 commit 4a23c73

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

libs/soba/staging/src/lib/environment/environment.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,10 @@ export class NgtsEnvironmentCube {
188188
this.envSet.emit();
189189
onCleanup(() => cleanup());
190190
});
191+
192+
inject(DestroyRef).onDestroy(() => {
193+
_texture()?.dispose();
194+
});
191195
}
192196
}
193197

0 commit comments

Comments
 (0)