()
| 283 | const mediaUrlCache = ctx.mediaUrlCache |
| 284 | |
| 285 | const dispose = (): void => { |
| 286 | if (disposed) return |
| 287 | disposed = true |
| 288 | |
| 289 | // Dispose chart instances whose DOM is inside this slide container |
| 290 | if (chartInstances) { |
| 291 | for (const chart of chartInstances) { |
| 292 | if (!chart.isDisposed() && container.contains(chart.getDom())) { |
| 293 | chart.dispose() |
| 294 | chartInstances.delete(chart) |
| 295 | } |
| 296 | } |
| 297 | } |
| 298 | |
| 299 | // Revoke blob URLs only in standalone mode (caller doesn't own a shared cache) |
| 300 | if (!isSharedCache) { |
| 301 | for (const url of mediaUrlCache.values()) { |
| 302 | URL.revokeObjectURL(url) |
| 303 | } |
| 304 | mediaUrlCache.clear() |
| 305 | } |
| 306 | } |
| 307 | |
| 308 | return { |
| 309 | element: container, |
no test coverage detected