CFStringRef

From Xojo Documentation

You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!

Data Type


This is an advanced data type for use with macOS and iOS API calls to handle OS strings.

Notes

CFStringRef implicitly converts to String or Text when assigned to String or Text variables.

Memory Management

The Xojo framework handles memory management of CFStringRefs smartly. Based on rules explained under Apple's Create Rule, a call to a declared function will either retain (CFRetain) the retrieved value or not. Once the CFStringRef object goes out of scope (i.e. it's no longer referenced by Xojo code), it will be released by calling CFRelease. That means that you usually do not have to worry about proper Retain/Release calls for CFStringRef objects you retrieve using declares.

See Also

Declare statements; String data type