title: Rx Disposing a subscription
body: <p>What is the recommended way to dispose of subscriptions that are created in a loop?
  In the following contrived example I'm generating subscriptions in a for loop and adding them to a <code>List</code> and disposing them explicity by for eaching over the <code>List</code>
  This seems a bit smelly to me and I'm thinking that there has to be a cleaner way to clean up the subscriptions unless the GC disposes them when it runs. Do I need to explicity Dispose the subscriptions?</p>
  
  <pre><code>class Program
  {
      static void Main(string[] args)
      {
          Func&lt;int, IEnumerable&lt;int&gt;&gt; func = x =&gt;
          {
              return Enumerable.Range(0, x);
          };
  
          List&lt;IDisposable&gt; subsriptions = new List&lt;IDisposable&gt;();
          for (int i = 1; i &lt; 10; i++)
          {
              var observable = func(i).ToObservable().ToList();
              var subscription = observable.Subscribe(x =&gt; Console.WriteLine(x.Select(y =&gt; y.ToString()).Aggregate((s1, s2) =&gt; s1 + "," + s2)));
              subsriptions.Add(subscription);
          }
          Console.ReadLine();
          subsriptions.ForEach(s =&gt; s.Dispose());
      }
  }
  </code></pre>