---
title: processPendingChanges()
framework: swiftdata
role: symbol
role_heading: Instance Method
path: swiftdata/modelcontext/processpendingchanges()
---

# processPendingChanges()

Tells the undo manager to record any changes made to the context’s registered models.

## Declaration

```swift
func processPendingChanges()
```

## Discussion

Discussion In AppKit-based applications, the system invokes this method at the end of each event loop. The framework may call it more frequently if it needs to coalesce your changes before continuing. You can also invoke it manually to coalesce any pending changes.

## See Also

### Performing undo and redo

- [undoManager](swiftdata/modelcontext/undomanager.md)
