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

Memory leak when port goes out of scope on Unix #1582

Open
reconbot opened this issue Jun 24, 2018 · 1 comment
Open

Memory leak when port goes out of scope on Unix #1582

reconbot opened this issue Jun 24, 2018 · 1 comment
Labels
bug linux macOS Mac OS X / OS X

Comments

@reconbot
Copy link
Member

  • SerialPort Version: 6.2.0
  • NodeJS Version: all
  • Operating System and Hardware Platform: unix/linux

Summary of Problem

#1572 fixes a memory leak in unix when the poller doesn't free it's callback. It's fixed by explicitly feeing the callback, but this wont work if the poller object goes out of scope.

@reconbot reconbot added linux macOS Mac OS X / OS X bug labels Jun 24, 2018
@shodan8192
Copy link

Poller object can go out of scope only with whole SerialPort object - when that happen without prior call port.close() (what will free Poller) we have also port that is open without possibility to close or use it again. I'm not sure if there's need to handle this case. Even if the user code intentionally let SerialPort go out of scope (e.g after use it once), the leak will be insignificant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug linux macOS Mac OS X / OS X
Development

No branches or pull requests

2 participants