I am currently using hot module replacement with React, and I have a memory leak related to Scenes and Vectors that are retained when a module is replaced. What is the best way to dispose of a Scene, Engine, Camera, Meshes, etc. with HMR?
you can dispose whole engine with
engine.dispose(), or just scene
scene.dispose(), depends on you r needs.
That can be done on unmount for example in react