I have an ItemsControl that uses a DataTemplate to display properties in my customClass that implements INotifyPropertyChanged...
Pretty straightforward...
Some items in the DataTemplate use CommandBindings (such as buttons), and a few have some code-behind (yuck).
When I empty the ItemsControl and set all instances of customClass = Nothing
, no memory is released from my program. This becomes a problem pretty quickly!
Any idea where I should start looking? I've even gone so far as to completely traverse the visual tree of each DataTemplate instance and set each Visual = Nothing.
I'm not really if that's supposed to have any effect though.