New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure DesktopCapturers are destroyed when no longer needed. #10223

merged 1 commit into from Aug 10, 2017


None yet
2 participants

ajmacd commented Aug 8, 2017

After an app calls desktopCapturer.getSources on macOS, the screen sharing icon will appear on the lock screen until the app is closed:

This happens because we currently never destroy the desktop capturers that are created upon getSources. This change has NativeDesktopMediaList destroy them when its user indicates it is finished by returning false from OnRefreshFinished.

To see this occur, run the demo app in this repo on macOS:

and check the lock screen after capturing the screen once. The screen share icon will be present until the app is killed. By replacing Electron with one built from this PR, the screen share icon is no longer present.


zcbenz approved these changes Aug 10, 2017


@zcbenz zcbenz merged commit c6289ef into electron:master Aug 10, 2017

1 of 2 checks passed

continuous-integration/travis-ci/pr The Travis CI build could not complete due to an error
continuous-integration/appveyor/pr AppVeyor build succeeded
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment