I have an Observable<WebResponse>
(WebResponse
implements IDisposable
)
responseObservable
.Where(webResponse => webResponse.ContentType.StartsWith("text/html"))
.Select(webResponse => webResponse.ContentLength)
.Run()
(Ignore the pointlessness of the query!)
so, I'm discarding WebResponse
instances without calling Dispose
on them. This seems bad.
More abstractly: If I have an Observable<IDisposable>
, how do I deal with the disposal of generated items?