* Clean up all observers and resources
()
| 317 | * Clean up all observers and resources |
| 318 | */ |
| 319 | destroy(): void { |
| 320 | // Disconnect all mutation observers |
| 321 | for (const observer of this.mutationObservers) { |
| 322 | observer.disconnect(); |
| 323 | } |
| 324 | this.mutationObservers.clear(); |
| 325 | |
| 326 | // Disconnect all performance observers |
| 327 | for (const observer of this.performanceObservers) { |
| 328 | observer.disconnect(); |
| 329 | } |
| 330 | this.performanceObservers.clear(); |
| 331 | |
| 332 | // Clear all data |
| 333 | this.clear(); |
| 334 | |
| 335 | // Reset singleton instance |
| 336 | PerformanceMonitor.instance = null; |
| 337 | } |
| 338 | |
| 339 | /** |
| 340 | * Enable or disable performance monitoring |
nothing calls this directly
no test coverage detected