Retired Document
Important: This document may not represent best practices for current development. Links to downloads and other resources may no longer be valid.
Core Foundation Libraries
When Core Foundation is installed on a Mac
OS 9 systems, you have two libraries at your disposal: a production
library (CoreFoundationLib
)
and a debug library (CoreFoundationLib Debug
).
When you use the debug version of the library you automatically
get assertion checking on common programming errors such as
accessing a collection out of bounds
attempting to change an immutable object
passing an argument of a wrong type
Currently assertions print a log message and cause a break in the debugger.
The production version of the Core Foundation library is optimized and performs no error checking; invalid parameters, even references to the wrong Core Foundation type, will cause indeterminate and probably incorrect behavior. Obviously, you should use the debug version of the Core Foundation library during development to catch errors in programming.
On Mac OS X, Core Foundation is a framework: a package consisting
of a dynamic shared library and associated resources, including
public header files. CoreFoundation.framework
also
includes a production version and a debug version of the library.
To use the debug version, set the environment variable DYLD_IMAGE_SUFFIX
to _debug
before
running the application; the dynamic linker will then check for
and link against the debug versions of any dynamic libraries, such
as Core Foundation, that your application uses.
Copyright © 2003 Apple Computer, Inc. All Rights Reserved. Terms of Use | Privacy Policy | Updated: 2003-01-17