UNPKG

@happy-table/vue3

Version:

A high-performance Vue 3 table component for B2B systems with TypeScript support

32 lines (31 loc) 1.07 kB
/** * Global cleanup utility for preventing memory leaks during page refresh * * This module addresses critical memory leaks caused by module-level variables * that persist across page lifecycles: * - globalCascadeManager singleton with accumulated update functions * - detectionCache Map that never gets cleared * - externalThemes and injectedStyles reactive Maps with DOM elements * - Various timeout references that may remain active */ /** * Register a cleanup function to be called on page unload */ export declare function registerCleanup(cleanup: () => void): void; /** * Unregister a cleanup function */ export declare function unregisterCleanup(cleanup: () => void): void; /** * Clear all module-level state to prevent memory leaks */ export declare function clearGlobalState(): void; /** * Initialize global cleanup listeners * Should be called once during application startup */ export declare function initializeGlobalCleanup(): void; /** * Cleanup global event listeners (for testing) */ export declare function destroyGlobalCleanup(): void;