|
Q: How can I tell if an Objective-C application has enabled Garbage Collection?A: To programmatically test your application to see if garbage collection is enabled, check the class if ([NSGarbageCollector defaultCollector] != nil) { /* the Garbage Collector is on */ } else { /* retain/release/autorelease/dealloc are being utilized */ } It may also be useful during debugging to set the environment variable For More Information See also Introduction to Garbage Collection and Garbage Collection API. Document Revision History
Posted: 2008-09-08 |
|