I'm working on a Silverlight app using the MVVM pattern. My ViewModel currently consists of a property that represents a collection of Model Objects:
public ObservableCollection<IndexEntry> IndexList
{
get;
set;
}
it also has several methods that will populate that collection with data that comes back from a webservice.
Since instances of this class may be created and destroyed over the course of the application runtime, should I implement IDisposable
and set the property's reference to null or will the destruction of this class be sufficient to remove all references to the collection tis property refers to? Are there any caveats that might leave a reference hanging out there?
Thanks.