Fix memory leaks in system_server

unlink DeathRecipients in a whole bunch of places to avoid memory leaks
This commit is contained in:
Suchi Amalapurapu
2009-06-30 21:36:16 -07:00
parent c56096fe1f
commit fff2fda019
8 changed files with 41 additions and 6 deletions

View File

@@ -119,6 +119,7 @@ public class StatusBarService extends IStatusBar.Stub
public void binderDied() {
Log.i(TAG, "binder died for pkg=" + pkg);
disable(0, token, pkg);
token.unlinkToDeath(this, 0);
}
}
@@ -494,6 +495,7 @@ public class StatusBarService extends IStatusBar.Stub
if (what == 0 || !token.isBinderAlive()) {
if (tok != null) {
mDisableRecords.remove(i);
tok.token.unlinkToDeath(tok, 0);
}
} else {
if (tok == null) {