<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreFoundation",
  "identifier" : "/documentation/CoreFoundation/CFMakeCollectable",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Core Foundation"
    ],
    "preciseIdentifier" : "c:@F@CFMakeCollectable"
  },
  "title" : "CFMakeCollectable"
}
-->

# CFMakeCollectable

Makes a newly-allocated Core Foundation object eligible for garbage collection.

```
extern CFTypeRefCFMakeCollectable(CFTypeRef cf);
```

## Parameters

`cf`

A CFType object to make collectable. This value must not be `NULL`.

## Return Value

`cf`.

## Discussion

For more details, see Garbage Collection Programming Guide.

### Special Considerations

If `cf` is `NULL`, this will cause a runtime error and your application will crash.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)