Fixes potential issue leaving ComputableResults alone

feature/top10
Laurent 7 years ago
parent 4b4cac69c4
commit 1801d62daf
  1. 12
      app/src/main/java/net/pokeranalytics/android/model/realm/Session.kt

@ -559,16 +559,14 @@ open class Session : RealmObject(), Savable, Editable, StaticRowRepresentableDat
*/
fun cleanup() {
// Updates the timeline
this.sessionSet?.let {
// Updates the timeline
SessionSetManager.removeFromTimeline(this)
// cleanup unnecessary related objects
this.result?.deleteFromRealm()
this.computableResults?.deleteAllFromRealm()
}
// cleanup unnecessary related objects
this.result?.deleteFromRealm()
this.computableResults?.deleteAllFromRealm()
}
@Ignore

Loading…
Cancel
Save