---
title: processPendingChanges()
framework: coredata
role: symbol
role_heading: Instance Method
path: coredata/nsmanagedobjectcontext/processpendingchanges()
---

# processPendingChanges()

Forces the context to process changes to the object graph.

## Declaration

```swift
func processPendingChanges()
```

## Discussion

Discussion This method causes changes to registered managed objects to be recorded with the undo manager. In AppKit-based applications, this method is invoked automatically at least once during the event loop (at the end of the loop)—it may be called more often than that if the framework needs to coalesce your changes before doing something else. You can also invoke it manually to coalesce any pending unprocessed changes.

## See Also

### Related Documentation

- [undo()](coredata/nsmanagedobjectcontext/undo().md)
- [undoManager](coredata/nsmanagedobjectcontext/undomanager.md)
- [redo()](coredata/nsmanagedobjectcontext/redo().md)

### Handling managed objects

- [shouldDeleteInaccessibleFaults](coredata/nsmanagedobjectcontext/shoulddeleteinaccessiblefaults.md)
- [insertedObjects](coredata/nsmanagedobjectcontext/insertedobjects.md)
- [updatedObjects](coredata/nsmanagedobjectcontext/updatedobjects.md)
- [deletedObjects](coredata/nsmanagedobjectcontext/deletedobjects.md)
- [shouldHandleInaccessibleFault(_:for:triggeredByProperty:)](coredata/nsmanagedobjectcontext/shouldhandleinaccessiblefault(_:for:triggeredbyproperty:).md)
- [insert(_:)](coredata/nsmanagedobjectcontext/insert(_:).md)
- [delete(_:)](coredata/nsmanagedobjectcontext/delete(_:).md)
- [assign(_:to:)](coredata/nsmanagedobjectcontext/assign(_:to:).md)
- [obtainPermanentIDs(for:)](coredata/nsmanagedobjectcontext/obtainpermanentids(for:).md)
- [detectConflicts(for:)](coredata/nsmanagedobjectcontext/detectconflicts(for:).md)
- [refresh(_:mergeChanges:)](coredata/nsmanagedobjectcontext/refresh(_:mergechanges:).md)
- [observeValue(forKeyPath:of:change:context:)](coredata/nsmanagedobjectcontext/observevalue(forkeypath:of:change:context:).md)
