Skip to content

SplatPager: null texture source to ensure underlying arrays can be GC'ed#326

Open
mrxz wants to merge 1 commit intosparkjsdev:mainfrom
mrxz:fix-dispose-pager
Open

SplatPager: null texture source to ensure underlying arrays can be GC'ed#326
mrxz wants to merge 1 commit intosparkjsdev:mainfrom
mrxz:fix-dispose-pager

Conversation

@mrxz
Copy link
Copy Markdown
Collaborator

@mrxz mrxz commented Apr 28, 2026

Alternative PR to #320 that nulls the texture source data. This removes all references to the underlying TypedArrays instead of only clearing the reference from SplatPager -> Texture. Since these textures are also referenced from (cached) shader materials, this avoids having to hunt them down manually.

Ultimately it's still a crude approach, but at least ensures no large memory leaks occur. A proper solution would be to ensure that the cached shader materials are disposed of. This way no references to the textures should remain, allowing them to GC'ed normally.

Co-authored-by: Aleksandr Korotaev <lekzd@mail.ru>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant