DLNAMediaDatabase.init connection not closed
DLNAMediaDatabase.init connection not closed
In the "init" method of DLNAMediaDatabase, the connection returned by the first call to
getConnection() is not closed.
Minor since init is only called once, but its still a memory/resource leak.
public void init(boolean force) {
dbCount = -1;
String version = null;
Connection conn = null;
ResultSet rs = null;
Statement stmt = null;
try {
conn = getConnection();
} catch (SQLException se) {
......
)
try {
conn = getConnection();
stmt = conn.createStatement();
......
getConnection() is not closed.
Minor since init is only called once, but its still a memory/resource leak.
public void init(boolean force) {
dbCount = -1;
String version = null;
Connection conn = null;
ResultSet rs = null;
Statement stmt = null;
try {
conn = getConnection();
} catch (SQLException se) {
......
)
try {
conn = getConnection();
stmt = conn.createStatement();
......
Re: DLNAMediaDatabase.init connection not closed
Thanks a lot, hopefully a fix will be in the next version