Fix: Clean up video element to prevent GPU memory leak#322
Fix: Clean up video element to prevent GPU memory leak#322upendra512 wants to merge 1 commit intoAOSSIE-Org:mainfrom
Conversation
Add video.pause() and video.srcObject = null to properly release GPU resources when stopping screen capture. Previously, the video element remained active after stopSharing, causing GPU memory leak. Fixes AOSSIE-Org#310 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughThe Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Suggested labels
Poem
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment Tip CodeRabbit can use oxc to improve the quality of JavaScript and TypeScript code reviews.Add a configuration file to your project to customize how CodeRabbit runs oxc. |
Description
Fixes Issue #310 - Video element not cleaned up in stopSharing causes GPU leak
Changes
video.pause()to stop video playbackvideo.srcObject = nullto release GPU pipeline resourcesTesting
Technical Details
The
stopSharingfunction was cleaning up the timer and MediaStream tracks, but the video element itself remained active with its srcObject still set. This prevented the browser from releasing GPU pipeline memory allocated for video decoding.Related Issue
Closes #310
Summary by CodeRabbit