WPF CollectionView can leak memory

A time ago I wrote about using collection views in WPF to achieve different looks at the same source collection. By creating different instances of ListCollectionView we could have the collection displayed in different sorting, ordering and grouping shape. Unfortunately there is small trap when using collection views.

By Mirek on (tags: CollectionView, memory leak, WPF, categories: code)

One collection – many views

Let’s imagine we have a huge collection of some objects (may be our data objects) and we need to filter this collection and display only a part of its elements in different places in our WPF application. Instead of creating many different instances of sub collection we can use the benefits of collection views.

By Mirek on (tags: CollectionView, WPF, categories: code)