Short answer – all visible (i.e. not filtered-out) items get removed, NOT all items.

Consider this coding masterpiece:

1
2
3
4
5
6
7
8
9
10
11
12
13
var ac:ArrayCollection = new ArrayCollection(['aa', 'bb', 'c']);
trace(ac.length + " " + ac.source.length);
ac.filterFunction = function ( item : Object ) : Boolean {
    return (String(item).length > 1);
};
ac.refresh();
trace(ac.length + " " + ac.source.length);
ac.removeAll();
trace(ac.length + " " + ac.source.length);
ac.filterFunction = null;
trace(ac.length + " " + ac.source.length);
ac.refresh();
trace(ac.length + " " + ac.source.length);

The output is (using SDK 4.6):
3 3
2 3
0 1
0 1
1 1

Yey, item ‘c’ cheated death in an ArrayCollection! It’s easy to see what’s happening inside ListCollectionView – Dr.Death loops only over visible items.
I’m guessing that this is intentional & not a bug in the SDK – I just think that this should be communicated better… or ideally the function could be improved to:

1
function removeAll(includingFiltered:Boolean=false):void

Note: I promise to stop complaining about poor ArrayCollection… for a while :-)