mcaselector icon indicating copy to clipboard operation
mcaselector copied to clipboard

Try with resources clean up

Open jimender2 opened this issue 2 years ago • 0 comments

There were several places in the code base where an object was opened and it had the possibility of not being closed if an error was thrown.

Since the objects that I saw already implemented the Closable interface, I went ahead and added a try with resources to automatically close the objects upon error/final usage of the object. This helps to prevent memory leaks and is a best practice.

jimender2 avatar Jun 12 '23 01:06 jimender2