---
title: endContentAccess()
framework: foundation
role: symbol
role_heading: Instance Method
path: foundation/nsdiscardablecontent/endcontentaccess()
---

# endContentAccess()

Called if the discardable contents are no longer being accessed.

## Declaration

```swift
func endContentAccess()
```

## Discussion

Discussion This method decrements the counter variable of the object, which will usually bring the value of the counter variable back down to 0, which allows the discardable contents of the object to be thrown away if necessary.

## See Also

### Accessing Content

- [beginContentAccess()](foundation/nsdiscardablecontent/begincontentaccess().md)
