---
title: "CFBitVectorCreateMutable(_:_:)"
framework: corefoundation
role: symbol
role_heading: Function
path: "corefoundation/cfbitvectorcreatemutable(_:_:)"
---

# CFBitVectorCreateMutable(_:_:)

Creates a mutable bit vector.

## Declaration

```swift
func CFBitVectorCreateMutable(_ allocator: CFAllocator!, _ capacity: CFIndex) -> CFMutableBitVector!
```

## Parameters

- `allocator`: The allocator to use to allocate memory for the new object. Pass NULL or kCFAllocatorDefault to use the current default allocator.
- `capacity`: The maximum number of values that can be contained by the new bit vector. The bit vector starts empty and can grow to this number of values (and it can have less). Pass 0 to specify that the maximum capacity is not limited. The value must not be negative.

## Return Value

Return Value A new bit vector. Ownership follows the The Create Rule.

## See Also

### Related Documentation

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

### Creating a CFMutableBitVector Object

- [CFBitVectorCreateMutableCopy(_:_:_:)](corefoundation/cfbitvectorcreatemutablecopy(_:_:_:).md)
