Should I be calling Dispose on Reactive Extensions (Rx) Subject

前端 未结 1 1619
花落未央
花落未央 2021-01-17 12:10

I am using the Reactive Extensions (Rx) Subject as a direct replacement for C# events like so:

public class MyClass
{
    private Subject subje         


        
相关标签:
1条回答
  • 2021-01-17 12:19

    Nope, you don't really need to do this. When worrying about memory usage and lifetimes, think about disposing Subscriptions, not Subjects.

    0 讨论(0)
提交回复
热议问题