Developer Docs

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

// Clean up when done
window.twikit.dispose();