The subject "memory leaks" It's not an easy subject, and not always is possible to realize when it comes to hum memory leak.
Not yet been an analysis (Diagnostic Tool VS2015) do to my project and found that there are memory leaks, specifically a ObservableCollectios.
My collection have some time, but, I have add and remove items over application usage, however, the memory used by the application never descends on forever.
Commented line of code:
OnPropertyChanged("MyCollection")
and the memory did not rise much, so I suspect this is the problem.
Would anyone can give me a hand?
Declaration:
private ObservableCollection<MyStructure> myCollection= new ObservableCollection<MyStructure>();
public ObservableCollection<MyStructure> MyCollection
{
get { return this.myCollection; }
set { this.SetProperty(ref this.myCollection, value); }
}
// do Add items and Remove, and soon after I make the following command:
OnPropertyChanged("MyCollection") // To update data in UI. This command is available in INotifyPropertyChanged
thank you