THPDFUnreachableObjectInfo Record
Object graph reachability totals together with the object numbers found to be unreachable from the document roots
Declaration
THPDFUnreachableObjectInfo= record
TotalObjectCount: Integer;
ReachableObjectCount: Integer;
UnreachableObjectCount: Integer;
RemovedObjectCount: Integer;
ObjectNumbers: THPDFObjectNumberArray;
end;
Unit
HPDFDoc
Fields
| Field | Purpose |
|---|---|
TotalObjectCount | Indirect objects that were enumerated in the loaded document |
ReachableObjectCount | Objects the mark-and-scan walk reached from the document roots |
UnreachableObjectCount | Objects that no root can reach, i.e. garbage left behind by earlier edits |
RemovedObjectCount | Unreachable objects that were actually deleted; nonzero only under the uopRemove policy |
ObjectNumbers | Object numbers belonging to the unreachable objects that were found |
Usage notes
- Fill it with
ApplyUnreachableObjectPolicy; the policy chooses between preserving, reporting and removing the garbage - The function's return value is the number of unreachable objects found, so a zero return means the graph is clean
- Reach for
uopReportfirst to reviewObjectNumbersbefore committing touopRemove, since freed-but-listed objects may still be referenced by revisions you mean to keep