Exemple #1
0
        WeakReference <TestSubscriber <int> > RunLeak()
        {
            TestSubscriber <int> ts = new TestSubscriber <int>(1);
            WeakReference <TestSubscriber <int> > wr = new WeakReference <TestSubscriber <int> >(ts);

            //Flowable.Range(1, 10)
            Flowable.Never <int>().Timeout(TimeSpan.FromSeconds(100))
            .Subscribe(ts);

            ts.Cancel();

            return(wr);
        }
Exemple #2
0
        WeakReference <TestSubscriber <int> > RunLeak()
        {
            TestSubscriber <int> ts = new TestSubscriber <int>(1);
            WeakReference <TestSubscriber <int> > wr = new WeakReference <TestSubscriber <int> >(ts);

            Flowable.Range(1, 3).Delay(TimeSpan.FromMilliseconds(1), Executors.Single)
            .Subscribe(ts);

            Thread.Sleep(25);

            ts.Cancel();

            return(wr);
        }