mirror of
https://github.com/electron/electron.git
synced 2026-01-27 08:18:28 -05:00
fix: free screen and window capturers immediately after we're finished with them (#20156)
fix #17937, #19908
This commit is contained in:
@@ -144,6 +144,7 @@ void DesktopCapturer::UpdateSourcesList(DesktopMediaList* list) {
|
||||
}
|
||||
std::move(window_sources.begin(), window_sources.end(),
|
||||
std::back_inserter(captured_sources_));
|
||||
window_capturer_.reset();
|
||||
}
|
||||
|
||||
if (capture_screen_ &&
|
||||
@@ -194,6 +195,7 @@ void DesktopCapturer::UpdateSourcesList(DesktopMediaList* list) {
|
||||
// individual screen support is added.
|
||||
std::move(screen_sources.begin(), screen_sources.end(),
|
||||
std::back_inserter(captured_sources_));
|
||||
screen_capturer_.reset();
|
||||
}
|
||||
|
||||
if (!capture_window_ && !capture_screen_)
|
||||
|
||||
Reference in New Issue
Block a user