Skip to content

Commit b2aeb0e

Browse files
committed
Close resources when they are not needed anymore
1 parent 1e82542 commit b2aeb0e

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

‎.gitignore‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
/gen
22
/bin
3+
/XposedBridgeApi*.jar

‎src/de/robv/android/xposed/XposedBridge.java‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ private static void loadModules(String startClassName) throws IOException {
111111
while ((apk = apks.readLine()) != null) {
112112
loadModule(apk, startClassName);
113113
}
114+
apks.close();
114115
}
115116

116117
private static void loadModule(String apk, String startClassName) {
@@ -145,6 +146,10 @@ private static void loadModule(String apk, String startClassName) {
145146
}
146147
} catch (IOException e) {
147148
log(e);
149+
} finally {
150+
try {
151+
is.close();
152+
} catch (IOException ignored) {}
148153
}
149154
}
150155

0 commit comments

Comments
 (0)