Skip to content

Commit

Permalink
add destroy method
Browse files Browse the repository at this point in the history
  • Loading branch information
wjoosen authored and MattiasBuelens committed May 27, 2024
1 parent 49bcfec commit c31a65a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions yospace/src/integration/YospaceConnector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,13 @@ export class YospaceConnector implements EventDispatcher<YospaceEventMap> {
this.yospaceManager.registerAnalyticEventObserver(analyticEventObserver);
}

/**
* Destroy the current session instance once it's no longer required, in order to prevent possible resource leaks on the viewer's device.
*/
destroy() {
this.yospaceManager.reset();
}

/**
* Unregister an analytics event observer from the Yospace SDK.
*
Expand Down

0 comments on commit c31a65a

Please sign in to comment.