Wendung.destroy() to shut down the SDK. It stops the flush timer, removes the visibilitychange and pagehide listeners, and, if the queue is non-empty, fires one final fire-and-forget flush of at most one batch; any remaining events are lost. Afterwards every SDK method throws [Wendung] Call .init() first until init() runs again. Most useful for test cleanup and micro-frontends that mount and unmount the SDK repeatedly.
Parameters
None.Returns
void
Examples
React cleanup in useEffect
Test suite teardown
The final flush is not awaited and sends at most one batch. To reliably drain the whole queue first, call
sendBeacon():