Eclipse java warning: Resource leak: ''unassigned Closeable value' is never closed
try(FileChannel f = new RandomAccessFile(new File(p),"rw").getChannel();){}
Where is the leak?
The resourece is RandomAccesFile. You are doing a new of this object, but you don´t store it into any variable, so you can never close it randomAccesFile.close().
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With