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

@@ -53,6 +53,12 @@ public class LocationProviderProxy implements IBinder.DeathRecipient {
}
}
public void unlinkProvider() {
if (mProvider != null) {
mProvider.asBinder().unlinkToDeath(this, 0);
}
}
public String getName() {
return mName;
}
@@ -255,5 +261,6 @@ public class LocationProviderProxy implements IBinder.DeathRecipient {
public void binderDied() {
Log.w(TAG, "Location Provider " + mName + " died");
mDead = true;
mProvider.asBinder().unlinkToDeath(this, 0);
}
}