Prevent memory leak

This commit is contained in:
M66B 2021-09-20 10:51:16 +02:00
parent 8af0d6a051
commit 1f87da32ca
1 changed files with 2 additions and 2 deletions

View File

@ -2172,12 +2172,12 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences
// Stop watching operations
Log.i(account.name + " stop watching operations");
final TwoStateOwner _owner = cowner.value;
getMainHandler().post(new Runnable() {
@Override
public void run() {
try {
if (cowner.value != null)
cowner.value.destroy();
_owner.destroy();
} catch (Throwable ex) {
Log.e(ex);
}