Skip to main content
Skip table of contents

Web SDK Reference | Dispose

The dispose() method terminates the Twikbot context and releases all associated resources, including:

  • WebGL rendering context

  • Web workers

  • Event listeners

  • Memory allocated for the 3D scene

Important: Always call dispose() when you're done using the configurator to prevent memory leaks, especially in single-page applications where components are mounted and unmounted frequently. This method is the counterpart of createContext described in the Web SDK Reference | Create Context documentation.


Parameters

None


Returns

voiddispose() does not return a value.


Example

JavaScript

CODE
// Clean up when done
window.twikit.dispose();
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.