marcofugaro / three-projected-material

📽 Three.js Material which lets you do Texture Projection on a 3d Model
https://marcofugaro.github.io/three-projected-material/
MIT License
671 stars 57 forks source link

mem leak, window resize handler not removed #31

Closed trusktr closed 2 years ago

trusktr commented 2 years ago

https://github.com/marcofugaro/three-projected-material/blob/5e0ed6d0be30db43850384fb09acb7400a2d718f/src/ProjectedMaterial.js#L252-L256

I don't see a dispose method, and that handler is never removed, so instances of this material can not be garbage collected.

marcofugaro commented 2 years ago

Good catch!