public void removeAll(int listID) {
        int head = heads[listID];
        heads[listID] = END_OF_LIST;

        // cycle through the list and free all the indexes.
        while (head != END_OF_LIST) {
            int temp = head;
            head = links[head];
            free(temp);
        }
    }
Removes all indexes from the specified list.
@param listID the list to be emptied.
Ghidra/Framework/Generic/src/main/java/ghidra/util/datastruct/IntListIndexer.java