---
title: "willRemove(from:)"
framework: coredata
role: symbol
role_heading: Instance Method
path: "coredata/nspersistentstore/willremove(from:)"
---

# willRemove(from:)

Invoked before the persistent store is removed from the persistent store coordinator.

## Declaration

```swift
func willRemove(from coordinator: NSPersistentStoreCoordinator?)
```

## Parameters

- `coordinator`: The persistent store coordinator from which the receiver was removed.

## Discussion

Discussion The default implementation does nothing. You can override this method in a subclass in order to perform any clean-up before the store is removed from the coordinator (and deallocated).

## See Also

### Responding to the Store Life Cycle

- [didAdd(to:)](coredata/nspersistentstore/didadd(to:).md)
