---
title: "store(in:)"
framework: combine
role: symbol
role_heading: Instance Method
path: "combine/anycancellable/store(in:)-6cr9i"
---

# store(in:)

Stores this type-erasing cancellable instance in the specified collection.

## Declaration

```swift
final func store<C>(in collection: inout C) where C : RangeReplaceableCollection, C.Element == AnyCancellable
```

## Parameters

- `collection`: The collection in which to store this doc://com.apple.Combine/documentation/Combine/AnyCancellable.

## See Also

### Storing instances

- [store(in:)](combine/anycancellable/store(in:)-3hyxs.md)
