---
title: CFMutableSet
framework: corefoundation
role: symbol
role_heading: Class
path: corefoundation/cfmutableset
---

# CFMutableSet

## Declaration

```swift
class CFMutableSet
```

## Overview

Overview CFMutableSet manages dynamic sets. The basic interface for managing sets is provided by CFSet. CFMutableSet adds functions to modify the contents of a set. You create a mutable set object using either the CFSetCreateMutable(_:_:_:) or CFSetCreateMutableCopy(_:_:_:) function. CFMutableSet provides several functions for adding and removing values from a set. The CFSetAddValue(_:_:) function adds a value to a set and CFSetRemoveValue(_:_:) removes a value from a set. CFMutableSet is “toll-free bridged” with its Cocoa Foundation counterpart, NSMutableSet. What this means is that the Core Foundation type is interchangeable in function or method calls with the bridged Foundation object. This means that in a method where you see an NSMutableSet * parameter, you can pass in a CFMutableSetRef, and in a function where you see a CFMutableSetRef parameter, you can pass in an NSMutableSet instance. This also applies to concrete subclasses of NSMutableSet. See Toll-Free Bridged Types for more information on toll-free bridging.

## Topics

### CFMutableSet Miscellaneous Functions

- [CFSetAddValue(_:_:)](corefoundation/cfsetaddvalue(_:_:).md)
- [CFSetCreateMutable(_:_:_:)](corefoundation/cfsetcreatemutable(_:_:_:).md)
- [CFSetCreateMutableCopy(_:_:_:)](corefoundation/cfsetcreatemutablecopy(_:_:_:).md)
- [CFSetRemoveAllValues(_:)](corefoundation/cfsetremoveallvalues(_:).md)
- [CFSetRemoveValue(_:_:)](corefoundation/cfsetremovevalue(_:_:).md)
- [CFSetReplaceValue(_:_:)](corefoundation/cfsetreplacevalue(_:_:).md)
- [CFSetSetValue(_:_:)](corefoundation/cfsetsetvalue(_:_:).md)

## Relationships

### Inherits From

- [CFSet](corefoundation/cfset.md)

### Conforms To

- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)

## See Also

### Related Documentation

- [Collections Programming Topics for Core Foundation](apple-archive/documentation/CoreFoundation/Conceptual/CFCollections.md)

### Opaque Types

- [CFAllocator](corefoundation/cfallocator.md)
- [CFArray](corefoundation/cfarray.md)
- [CFAttributedString](corefoundation/cfattributedstring.md)
- [CFBag](corefoundation/cfbag.md)
- [CFBinaryHeap](corefoundation/cfbinaryheap.md)
- [CFBitVector](corefoundation/cfbitvector.md)
- [CFBoolean](corefoundation/cfboolean.md)
- [CFBundle](corefoundation/cfbundle.md)
- [CFCalendar](corefoundation/cfcalendar.md)
- [CFCharacterSet](corefoundation/cfcharacterset.md)
- [CFData](corefoundation/cfdata.md)
- [CFDate](corefoundation/cfdate.md)
- [CFDateFormatter](corefoundation/cfdateformatter.md)
- [CFDictionary](corefoundation/cfdictionary.md)
- [CFError](corefoundation/cferror.md)
