问题
In my project i have to call RxApp.MainThreadScheduler.Schedule(() => ...)
Should I dispose subscription mannualy by adding DisposeWith(DisposableOnDestroy)
or it automatically called by destructor?
I have read ReactiveUI recomendations, but did not find answer
RxApp.MainThreadScheduler.Schedule(() => this.RaisePropertyChanged(statisticName))
回答1:
No, only Dispose if you want to cancel a queued operation early. Also, what you're trying to do with RaisePropertyChanged here will eventually make your app extremely slow once it gets bigger.
来源:https://stackoverflow.com/questions/58026600/should-i-dispose-ischeduler-schedule-subscription-mannualy-to-avoid-memory-leaks