(X) Hide this SilverlightShow next training events: Secure & Personalize Your Silverlight App with WCF RIA Services. May 25th, 10 am PST. Sign up
XNA for Windows Phone 7 - a 3 day training by MCC Peter Kuhn. June 1-3, 9 am - 1.30 pm PST. Sign up early-bird for $199.
Skip Navigation LinksHome / News / View News

Managing Resources with Reactive Extensions

+ Add to SilverlightShow Favorites
0 comments   /   posted by Silverlight Show on May 27, 2011
(0 votes)
SilverlightShow Page for all Silverlight and Windows Phone 7 (WP7) things on Twitter

Jesse Liberty explains how to manage limited resources, and to dispose of any unmanaged resources with Reactive Extensions.

Source: Jesse's Blog

While Reactive Extensions will clean up after itself, it is still your responsibility to manage limited resources, and to dispose of any unmanaged resources.

You can, however, use a variant on the using statement with Observables.

To do so, call the static parameterized Using method on Observable. This returns an IObservable<char> and takes two parameters. The first parameter is a Func that returns a streamReader and the second is a Func that takes the StreamReader produced by the first and returns an IObservable of char.
Share


Comments

Comments RSS RSS
No comments

Add Comment

 
 

   
  
  
   
Please add 3 and 6 and type the answer here: