Continuously updated shape leads to memory leak

In this example https://www.babylonjs-playground.com/#6TLQDW#1 the height of a cylinder is continuously increased using the update method but at each cycle the number of meshes in the scene increases by 1 (see console). Is that normal (the animation lags after some time) ?

And is it normal I have to add the material in each cycle ? Why not dispose of the cylinder and create a new one ?

I am surely missing something…

How should the update be done and what are the advantages of updatable ?

Cylinder doesn’t take an instance to create itself from. Updatable just means that you can update its vertex data.
You will need to either use scaling, or dispose the old one before creating the new one:

updatable cylinder (memory leak) | Babylon.js Playground (babylonjs-playground.com)

5 Likes