You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix: Additional memory leaks and performance issues in plugins (#4211)
* Fix: Clear envelope plugin timeouts and event listeners on destroy
- Clear throttleTimeout in EnvelopePlugin destroy to prevent callbacks after destruction
- Store and remove dblclick listener from Polyline SVG element
- Store and remove touch event listeners (touchstart, touchmove, touchend)
- Clear pressTimer on Polyline destroy to prevent pending callbacks
Fixes memory leaks in envelope plugin (issues #16, #21, #22)
* Fix: Improve hover plugin event listener cleanup and memory usage
- Create unsubscribe functions immediately after attaching listeners
- Store only pointer coordinates instead of entire PointerEvent object
- Properly track zoom and scroll event unsubscribers
Fixes issues #17 and #24
* Fix: Remove zoom wheel listener from correct element
- Listener was added to container but removed from wrapper
- Now correctly removes listener from container element
Fixes issue #18
* Fix: Use single scroll listener for all timeline notches
- Refactored to use one scroll listener instead of one per notch
- Store notch metadata in a Map for batch visibility updates
- Significantly improves scroll performance with many notches
- Previously created N listeners for N notches (e.g., 60 for a 60-second audio)
Fixes issue #19
* Fix: Clear minimap container reference and prevent race condition
- Clear container reference on destroy to aid garbage collection
- Add isInitializing flag to prevent concurrent initMinimap() calls
- Ensures proper cleanup and prevents orphaned WaveSurfer instances
Fixes issues #20 and #25
* Fix: Improve decoder AudioContext safety and input validation
- Use explicit try/finally for AudioContext cleanup in decode()
- Add input validation to createBuffer() to prevent invalid AudioBuffer
- Prevent division by zero and undefined channel data errors
Fixes issues #23 and #29
* Fix: Clarify renderer createDelay logic and cleanup
- Rename 'reject' variable to 'rejectFn' for clarity
- Clear both timeout and reject function in onClear
- Add explicit typing and comments for better maintainability
- Ensure proper cleanup of pending delays
Fixes issue #26
* Doc: Clarify blob URL management responsibility in WebAudioPlayer
- Add documentation noting WebAudioPlayer doesn't manage blob URLs
- Clarify that Player class handles blob URL lifecycle
- Helps prevent memory leaks when using WebAudioPlayer standalone
Addresses issue #27
* Fix: Reorder player destroy operations for logical cleanup
- Call media.load() before media.remove() instead of after
- Ensures media element is properly reset before DOM removal
- More logical cleanup sequence
Fixes issue #30
* Fix: Move validation after channelData conversion in decoder
- Validate channel length after converting flat array to array of arrays
- Prevents false validation errors for valid flat array inputs
- Fixes failing e2e tests for pre-decoded waveform and blob loading
0 commit comments