---
title: kCFAllocatorNull
framework: corefoundation
role: symbol
role_heading: Global Variable
path: corefoundation/kcfallocatornull
---

# kCFAllocatorNull

This allocator does nothing—it allocates no memory.

## Declaration

```swift
let kCFAllocatorNull: CFAllocator!
```

## Discussion

Discussion This allocator is useful as the bytesDeallocator in CFData or contentsDeallocator in CFString where the memory should not be freed.

## See Also

### Constants

- [kCFAllocatorDefault](corefoundation/kcfallocatordefault.md)
- [kCFAllocatorSystemDefault](corefoundation/kcfallocatorsystemdefault.md)
- [kCFAllocatorMalloc](corefoundation/kcfallocatormalloc.md)
- [kCFAllocatorMallocZone](corefoundation/kcfallocatormalloczone.md)
- [kCFAllocatorUseContext](corefoundation/kcfallocatorusecontext.md)
