Skip to content
Snippets Groups Projects
Commit 1465912d authored by Volker Richert's avatar Volker Richert
Browse files

close Realm also after getInstance

parent 8b1a9cbe
No related branches found
No related tags found
No related merge requests found
......@@ -42,7 +42,10 @@ public class DataStore {
}
public void setLastPumpStatus(PumpStatusEvent lastPumpStatus) {
this.lastPumpStatus = Realm.getDefaultInstance().copyFromRealm(lastPumpStatus);
Realm realm = Realm.getDefaultInstance();
this.lastPumpStatus = realm.copyFromRealm(lastPumpStatus);
if (!realm.isClosed()) realm.close();
}
public int getUplooaderBatteryLevel() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment