I am working on a Silverlight app using the MVVM pattern. My view model currently contains a property that represents the collection of model objects:
Public supervision
There are several ways in which it will store that data with a collection that comes from a webservice.
Since the examples of this class can be created and destroyed, through the application runtime, should I implement the IDisposable
and the property should be blank or should it The destruction of the category is enough to remove all references to TIS property? Are there any warnings that can hang a reference that hangs there?
Thank you.
Its only method is garbage collection, if it is root, then one reference is left. If there is any other class that is still in use, which includes the reference to the Observational, then the Observeable Collection will not be destroyed, even if you do not set it to clear or not. For example, suppose there is a reference in a 'memory' object that is your collection in your property. Some other codes execute the executable collection & lt; myOtherReference = YourObject.IndexList; They are still in reference to the real memory object. Tapping your property reference will only end the reference of your property; 'MyOtherReference' The reference is unaffected, because it is pointing directly into memory, and not on your property. If you really want to end this item from memory, then you have all the references There is a need to remove or apply some decisive 'settlement' argument, at which point "myotherrference" will be an indicator for a filtrate object, and it will be thrown to any call. An exception.
Comments
Post a Comment