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

@@ -709,7 +709,10 @@ class PowerManagerService extends IPowerManager.Stub implements LocalPowerManage
p.awakeOnSet = true;
}
} else {
mPokeLocks.remove(token);
PokeLock rLock = mPokeLocks.remove(token);
if (rLock != null) {
token.unlinkToDeath(rLock, 0);
}
}
int oldPokey = mPokey;