mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-18 07:59:08 +00:00
Fix memory leaks by closing streams
This commit is contained in:
1 parent
39e51bc8c2
commit
540508a2be
18 files changed
+96
-60
No files matched your search
@@ -79,7 +79,9 @@ public class BankController {
|
||||
}
|
||||
|
||||
private void loadBanks(File file) throws IOException {
|
||||
loadBanks(CompressedStreamTools.readCompressed(new FileInputStream(file)));
|
||||
try (FileInputStream fis = new FileInputStream(file)) {
|
||||
loadBanks(CompressedStreamTools.readCompressed(fis));
|
||||
}
|
||||
}
|
||||
|
||||
public void loadBanks(NBTTagCompound nbttagcompound1) throws IOException {
|
||||
|
||||
Reference in new issue
Block a user