Find resource leaks (AutoCloseables that should have been closed)
- Dominant language
- Java
- Stars
- 7.2k
- Forks
- 820
- Avg merge
- 5h 9m
- Merged PRs (30d)
- 50
Description
_[Original issue](https://code.google.com/p/error-prone/issues/detail?id=264) created by **cushon@google.com** on 2014-10-30 at 04:01 PM_
---
Originally reported by kevinb9n:
Many ways of obtaining an AutoCloseable instance imply responsibility on the obtainer to close that instance (e.g. by obtaining it inside try-with-resources), and many don't. For error-prone to be able to detect resource leaks it would need some way to differentiate. How?
eaftan notes:
We can use dataflow to determine how the instance was obtained. Is it always the case that knowing the provenance of the instance is enough to know whether it needs to be closed? Can you provide examples other than try-with-resources?
Contributor guide
Assessment
This issue has not been assessed yet.