HCL-TECH-SOFTWARE / domino-jnx

Modern Domino Java API based on JNA access to Domino's C API
https://opensource.hcltechsw.com/domino-jnx/
Apache License 2.0
14 stars 3 forks source link

Switch use of DisposableMemory to use try-with-resources #376

Closed jesse-gallagher closed 1 year ago

jesse-gallagher commented 1 year ago

DisposableMemory already implements AutoCloseable, and newer JNA releases expose close() on Memory directly. It'll be good for code cleanliness to switch to try-with-resources blocks, and then to eventually remove our dispose() exposure method outright (it causes stack overflows in new JNA versions).