I have a filtered ListView. It removes items from the ListView itself and then adds them to an ArrayList for turning off the filter again.
The problem is that each time I use remove on the Items collection to remove the given item, it finalizes it and calls in the garbage collector. I'd like to reuse it however since that saves me a copy of the contents (which are non-trivially sized). Turning off the filter (adding the full arraylist to the item collection) takes around 2-3 seconds for a big amount, turning on the filter takes a minute.
Does anybody know how to speed this up or how to make ListView (from which I inherit) not delete the ListViewItem ?
The problem is that each time I use remove on the Items collection to remove the given item, it finalizes it and calls in the garbage collector. I'd like to reuse it however since that saves me a copy of the contents (which are non-trivially sized). Turning off the filter (adding the full arraylist to the item collection) takes around 2-3 seconds for a big amount, turning on the filter takes a minute.
Does anybody know how to speed this up or how to make ListView (from which I inherit) not delete the ListViewItem ?