---
title: invalidate()
framework: fileprovider
role: symbol
role_heading: Instance Method
path: fileprovider/nsfileproviderreplicatedextension/invalidate()
---

# invalidate()

Tells the file provider to perform any necessary cleanup so that the system can deallocate it.

## Declaration

```swift
func invalidate()
```

## Discussion

Discussion Your implementation should perform any necessary cleanup so that the system can dismiss and deallocate the file provider. note: Your extension must handle multiple active copies of the File Provider extension in the same process, for instance, if the user has several active domains, or when the system discards one instance while initiating another.

## See Also

### Creating and Removing File Providers

- [init(domain:)](fileprovider/nsfileproviderreplicatedextension/init(domain:).md)
