Unable to destroy the viewport on my frontend

I have a single-page frontend.
The viewport is re-initializing on every view of the product.
Resulting in model overlaps inside canvas.
Not able to find api to destroy before initialize.

AND not able to find it in the documentation as well! (Viewers)

My code:

window.viewer = await SDV.createViewport({ 
    canvas: document.getElementById('sdv-container'), 
  });
  

  window.session = await SDV.createSession({
    ticket: shape_diver_ticket,
    modelViewUrl: model_url
  });

Screenshot contains 3 models in a single canvas.

Need help with this please.

If you end up with multiple instances of your model in the scene, that probably means there is a bug in your single page app which creates more than one session for your model. You can use the close function of a session to close it and remove its geometry from the scene.