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

# reset()

Returns the context to its base state.

## Declaration

```swift
func reset()
```

## Mentioned in

Accessing data when the store changes

## Discussion

Discussion All the receiver’s managed objects are “forgotten.” If you use this method, you should ensure that you also discard references to any managed objects fetched using the receiver, since they will be invalid afterwards.

## See Also

### Related Documentation

- [stalenessInterval](coredata/nsmanagedobjectcontext/stalenessinterval.md)

### Undoing changes

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