THPDFUnreachableObjectInfo Record
Object graph reachability totals and the object numbers found 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 enumerated in the loaded document |
ReachableObjectCount | Objects reached by the mark-and-scan walk from the document roots |
UnreachableObjectCount | Objects no root can reach, i.e. garbage left by earlier edits |
RemovedObjectCount | Unreachable objects actually deleted, nonzero only under the uopRemove policy |
ObjectNumbers | Object numbers of the unreachable objects found |
Usage notes
- Fill it with
ApplyUnreachableObjectPolicy; the policy chooses between preserving, reporting, or removing the garbage - The returned function value is the number of unreachable objects found, so a zero return means the graph is clean
- Use
uopReportfirst to reviewObjectNumbersbefore committing touopRemove, since freed-but-listed objects can still be referenced by revisions you plan to keep