Fixed memory leak in Config's load method.
This commit is contained in:
parent
54a6cbf4c8
commit
6a90e47e77
@ -66,7 +66,9 @@ public class Config
|
|||||||
private JSONObject loadConfig(File file) throws IOException, ParseException
|
private JSONObject loadConfig(File file) throws IOException, ParseException
|
||||||
{
|
{
|
||||||
FileReader reader = new FileReader(file);
|
FileReader reader = new FileReader(file);
|
||||||
return (JSONObject) parser.parse(reader);
|
JSONObject object = (JSONObject) parser.parse(reader);
|
||||||
|
reader.close();
|
||||||
|
return object;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Reference in New Issue
Block a user