Skip to content

Commit

Permalink
Dispose geometry & material when not used anymore. (#23002)
Browse files Browse the repository at this point in the history
  • Loading branch information
gero3 authored Dec 11, 2021
1 parent fde01b8 commit 8f22ee5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion examples/webgl_performance_shader.html
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,9 @@

const obj = scene.children[ i ];
scene.remove( obj );

obj.geometry.dispose();
obj.material.dispose();

}

}
Expand Down

0 comments on commit 8f22ee5

Please sign in to comment.