Object Lifecycle States

Every object in a loaded document carries an explicit lifecycle state from THPDFObjectLifecycleState: olsRaw for indexed-but-unmaterialized compressed members, olsParsed for objects materialized from source bytes without modifications, olsDirty / olsMustWrite for modified or update-mandated objects, olsFlushed for objects already serialized to the output document, and olsReleased for objects whose backing buffers were released

State Queries

GetLoadedObjectLifecycleState reports the state of any object number, returning olsRaw for compressed members whose body has not been materialized yet; GetLoadedObjectLifecycleStatistics aggregates per-state counts including the new RawCount, ParsedCount, and FlushedCount fields; THPDFObject.MarkRaw, MarkParsed, and MarkFlushed set the states explicitly

Save Behavior

The full-save paths move every emitted object to olsFlushed (wrapper and inner object), graph transaction snapshots restore the captured state on rollback, and the incremental-update baseline still resets objects to olsClean so appended revisions contain only explicitly dirtied entries; IsDirty keeps its original meaning of olsDirty or olsMustWrite, so the new states never trigger spurious rewrites