export interface MemoryInfo { usedJSHeapSize: number; totalJSHeapSize: number; jsHeapSizeLimit: number; } export interface MemoryStats { canvasCount: number; videoCount: number; blobURLCount: number; estimatedMemoryUsage: number; poolSize: number; } export type CleanableResource = HTMLCanvasElement | HTMLVideoElement | string | ImageData | null | undefined; export type CleanupCallback = () => void | Promise; export interface ResourceScope { track(...resources: CleanableResource[]): void; cleanup(): Promise; } export interface PoolConfig { maxSize: number; maxCanvasSize: number; cleanupInterval?: number; memoryThreshold?: number; } export declare class MemoryManager { private static instance; private canvasPool; private trackedCanvases; private trackedVideos; private trackedBlobURLs; private cleanupCallbacks; private config; private constructor(); static getInstance(): MemoryManager; createCanvas(width: number, height: number): HTMLCanvasElement; cleanupCanvas(canvas: HTMLCanvasElement | null | undefined): void; returnCanvasToPool(canvas: HTMLCanvasElement): void; reuseCanvas(canvas: HTMLCanvasElement, width: number, height: number): void; cleanupVideo(video: HTMLVideoElement | null | undefined): void; prepareVideoForCleanup(video: HTMLVideoElement): void; private removeAllEventListeners; trackBlobURL(url: string): void; revokeBlobURL(url: string): void; revokeAllBlobURLs(): void; releaseImageData(imageData: ImageData | null | undefined): void; estimateImageDataSize(imageData: ImageData): number; cleanup(...resources: CleanableResource[]): void; cleanupAll(): void; registerCleanupCallback(callback: CleanupCallback): () => void; getCurrentMemoryUsage(): MemoryInfo | null; isMemoryPressureHigh(threshold?: number): boolean; getMemoryStats(): MemoryStats; withCleanup(fn: () => T | Promise, ...resources: CleanableResource[]): Promise; createScope(): ResourceScope; configure(options: Partial): void; getConfig(): PoolConfig; reset(): void; } declare const _default: MemoryManager; export default _default; //# sourceMappingURL=MemoryManager.d.ts.map