posthog-js 1.275.0 → 1.275.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1975,6 +1975,7 @@ declare class SessionIdManager {
1975
1975
  private _sessionIdChangedHandlers;
1976
1976
  private readonly _sessionTimeoutMs;
1977
1977
  private _enforceIdleTimeout;
1978
+ private _beforeUnloadListener;
1978
1979
  private _eventEmitter;
1979
1980
  on(event: 'forcedIdleReset', handler: () => void): () => void;
1980
1981
  constructor(instance: PostHog, sessionIdGenerator?: () => string, windowIdGenerator?: () => string);
@@ -1986,6 +1987,11 @@ declare class SessionIdManager {
1986
1987
  private _setSessionId;
1987
1988
  private _getSessionId;
1988
1989
  resetSessionId(): void;
1990
+ /**
1991
+ * Cleans up resources used by SessionIdManager.
1992
+ * Should be called when the SessionIdManager is no longer needed to prevent memory leaks.
1993
+ */
1994
+ destroy(): void;
1989
1995
  private _listenToReloadWindow;
1990
1996
  private _sessionHasBeenIdleTooLong;
1991
1997
  checkAndGetSessionAndWindowId(readOnly?: boolean, _timestamp?: number | null): {