Skip to content
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

内存得不到释放 #233

Open
mushan0x0 opened this issue Jan 13, 2024 · 1 comment
Open

内存得不到释放 #233

mushan0x0 opened this issue Jan 13, 2024 · 1 comment

Comments

@mushan0x0
Copy link

mushan0x0 commented Jan 13, 2024

Describe the bug
截图后会始终存在一个 Renderer 进程得不到释放,设置了 singleWindow: false ,和执行了 screenshots.endCapture(); 都无效

image

Versions (please complete the following information):

  • OS: MacOS
  • Electron 26
  • electron-screenshots 0.5.26
@ajieun
Copy link

ajieun commented Mar 9, 2024

在你关闭最后一个窗口的时候进行销毁就行了比如

let screenshotsInstance = new Screenshots({singleWindow: true});
if(screenshotsInstance.$view){
screenshotsInstance.$view = null
}
if(screenshotsInstance.$win){
screenshotsInstance.$win.close()
}
screenshotsInstance = null

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants