public int RemoveUnusedObjects() {
bool[] hits = new bool[xrefObj.Count];
RemoveUnusedNode(trailer, hits);
int total = 0;
if (partial) {
for (int k = 1; k < hits.Length; ++k) {
if (!hits[k]) {
xref[k * 2] = -1;
xref[k * 2 + 1] = 0;
xrefObj[k] = null;
++total;
}
}
}
else {
for (int k = 1; k < hits.Length; ++k) {
if (!hits[k]) {
xrefObj[k] = null;
++total;
}
}
}
return total;
}