// use remove(int[]) rather than repeated TableItem.dispose() calls
// to allow SWT to optimize multiple removals
int[] indices = new int[elements.length];
int count = 0;
for (int i = 0; i < elements.length; ++i) {
Widget w = findItem(elements[i]);
if (w == null && virtualManager != null) {
int index = virtualManager.find(elements[i]);
if (index != -1) {
indices[count++] = index;
}