after looking a bit at the code, I would recommend to correct the DB access in a sense where resources should be closed.
Prepared statements should be in try with resources as well as Resultsets, however in order to achive this there should be a small refactoring here
|
public ResultSet executeQuery(String sqlRequest, Object... args) throws SQLException |
this should either return the statement or a custom class, however I might refoctor this if you want and add different things that I have in mind to make this correct.
When those resources are not closed properly, the GC (garbage collector) would not clean those and thus memory problems might araise.
after looking a bit at the code, I would recommend to correct the DB access in a sense where resources should be closed.
Prepared statements should be in try with resources as well as Resultsets, however in order to achive this there should be a small refactoring here
DiscordAuth/src/main/java/com/denisindenbom/discordauth/database/DataBase.java
Line 15 in a4b4d38
this should either return the statement or a custom class, however I might refoctor this if you want and add different things that I have in mind to make this correct.
When those resources are not closed properly, the GC (garbage collector) would not clean those and thus memory problems might araise.